The current built-in _tmpl: method of kendo.grid constructs a very nice automatic row template that is aware of alternation, hasDetails and all the columns.* configuration settings such as formats and attributes. Two new templateSettings could make the automatic template even more useful, especially for row-wise highlighting based on data conditions (aka traffic highlighting): templateSettings.autoGridTrClassHook : string - inject addtional classes or kendo template source into the class="..." attribute of the <TR> element in the automatic row template templateSettings.autoGridTrHook : string - inject addtional html source or kendo template source into the <TR> element of the automatic row template Example $('#grid').empty().kendoGrid({ dataSource: myRemoteDS, ... templateSettings: { autoGridTrClassHook: '# if (data.Recent==="Y") { # is-recent #}#' }, ... Some css .is-recent { font-style: italic; background: #FFFFCC; } .is-recent.k-alt { font-style: italic; background: #FFFF99; } .is-recent.k-state-selected { font-style: italic; background: #6600FF; }
Hello, Richard,
This functionality can currently be achieved by utilizing the columns.attributes but we can see that having the attributes in the row would make it an easier way to handle scenarios where different styles are required for the rows :
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.attributes
Kind Regards,
Alex Hajigeorgieva
Progress Telerik