We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to create a Row template in TreeGrid?

Platform: ASP.NET MVC |
Control: TreeGrid |
Published Date: January 23, 2015 |
Last Revised Date: January 23, 2015

How to create a Row template in TreeGrid?

In TreeGrid control, you can customize each row by providing templates or Jsrender script elements. These script elements can be provided as templates for the TreeGrid row using RowTemplateId property. The following is the code example for a simple Jsrender template.

CSHTML

For providing alternate row style in TreeGrid using templates, the AltRowTemplateId property can be used. The following code example is for applying templates for MVC TreeGrid rows.

CSHTML

The following code snippet explains how to use the row template in MVC TreeGrid control.

CSHTML

 

ADD COMMENT
You must log in to leave a comment
Comments
Megatron
Feb 04, 2016
hi How can I add an icon to the row, depending on the data item, like a book icon vs person icon in the same column Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon