This question is locked. New answers and comments are not allowed.
I am trying to change the ClientTemplate for a column based on the data in the row, but am unable to figure out how to do this. Here is the sample code that I am trying to use for an AJAX bound grid.
<%: Html.Telerik().Grid<TelerikBugs.Models.Employee>() .Name("Employees") .Columns(columns => { columns.Bound(o => o.EmployeeName).ClientTemplate("<ul><li>EmployeeId: <#= EmployeeId #></li><li>EmployeeName: <#=EmployeeName#></li></ul>") ; columns.Bound(o => o.ManagerEmployeeId); columns.Bound(o => o.EmployeeId) .ClientTemplate("I want to change this value") .Width(500) .HeaderHtmlAttributes("visible='false'") .Title("Employee"); }) .CellAction(cell => { if (cell.Column.Member == "EmployeeId") { var employee = cell.DataItem; if (employee.EmployeeId == 1) { cell.Column.ClientTemplate = "EmployeeId is #1 do #1 formatting here"; } else { cell.Column.ClientTemplate = "EmployeeId is NOT #1 other formatting here"; } } }) .DataBinding(dataBinding => dataBinding.Ajax().Select("GetEmployees", "Home")) %>