This sample demonstrates the usage of template columns in a Grid. In this sample, custom images are shown in the Employee Image column.
Image | ID | Name | Email ID | Designation | Date Joined | Team(s) | Reporter | Availability | Experience | Asset Kit | Assigned Date | Location | Contact No |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Emp1001 | John | john@abc.com | Sales Representative | 5/1/1992 | Sales | Vinet | Available | 3 Years | Headset Laptop Phone | 5/1/1992 | Reims | (711) 555-4444 | |
Emp1002 | Suyama | suyama@abc.com | Marketing Manager | 8/14/1992 | Marketing | Suprd | Available | 1 Year 10 Months | Laptop Projector Tablet | 8/14/1992 | Albuquerque | (206) 555-1189 | |
Emp1003 | Janet | janet@abc.com | HR Specialist | 4/1/1992 | Human Resources | Hanar | Not Available | 1 Year | Headset Laptop Printer | 4/1/1992 | Barquisimeto | (710) 555-5598 | |
Emp1004 | Peacock | peacock@abc.com | Sales Representative | 5/3/1993 | Sales | Vinet | Available | 2 Years | Headset Laptop Phone | 5/3/1993 | Albuquerque | (811) 555-7773 | |
Emp1005 | Leverling | leverling@abc.com | IT Support | 10/17/1993 | IT Department | Tomsp | Not Available | 5 Years 3 Months | Keyboard Laptop Mouse | 10/17/1993 | Reims | (712) 555-4848 | |
Emp1006 | Fuller | fuller@abc.com | HR Specialist | 10/17/1993 | Human Resources | Victe | Available | 3 Years 1 Month | Headset Laptop Printer | 10/17/1993 | Barquisimeto | (206) 555-8122 | |
Emp1007 | Buchanan | buchanan@abc.com | Marketing Manager | 1/2/1994 | Marketing | Hanar | Not Available | 4 Years | Laptop Projector Tablet | 1/2/1994 | Reims | (206) 555-3412 | |
Emp1008 | Davolio | davolio@abc.com | Customer Service | 3/5/1994 | Customer Support | Vinet | Not Available | 11 Months | Headset Laptop Phone | 3/5/1994 | Albuquerque | (206) 555-9482 | |
Emp1009 | Robert | robert@abc.com | Finance Analyst | 11/15/1994 | Finance | Suprd | Available | 3 Years 5 Months | Calculator Headset Laptop | 11/15/1994 | Reims | (206) 555-9857 |
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 More information on the column template can be found in this documentation section.