Example of Column Template in ASP.NET MVC Data Grid Control

This sample demonstrates the usage of template columns in a Grid. In this sample, custom images are shown in the Employee Image column.

DEMO
SOURCE

The Grid creates a custom layout for each cell using the column template feature. The columns->template property accepts either string or HTML element`s ID value, which will be used as the template for the cell.

The column template feature allows the customization of grid cells. In this demo, the Grid showcases the Employee Image column with employee photos, Mail ID column with link tags, Location column with location icons, Asset Kit column with Syncfusion Chip components and Employee Availability column with HTML span elements, using green to indicate available and red to indicate for not available.

The template expression should be provided inside ${...} interpolation syntax.

Transform your ASP.NET MVC web apps today with Syncfusion ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab