Extension Points and Source Code Customization : Row templates : Row template function
  

Row template function

The Row Template Function and Alt Row Template Function properties allow you to specify a function that processes the template and returns the result of executing the template for the data.
The code for this function is defined in the controller.public.js file for a given grid view found at the following location:
webAppDir\app\src\modules\module-folder\view-folder\
For more information, see Custom code.
There are three main parts to a row template function:
*The text for the template.
*The template function obtained by calling kendo.template().
*The result of applying the template to the dataItem.
Following is a sample row template function that can be defined in a controller.public.js file:
rowTemplate(dataItem) {
var template = kendo.template('<tr data-uid="#= uid #">
<td><b>#= EmpNum #</b></td>
<td>#= LastName #</td>
<td>#= FirstName #</td>
<td>#= State #</td></tr>');
return template(dataItem);
}