Is it possible to use a Template and a ClientTemplate at the same time?
I want to do a bool check in the Template but don’t know how to pass it to the checkbox in the ClientTemplate when there is no binding.
@(Html.Telerik().Grid(Model.Item)
.Name("Grid")
.Columns(column =>
column.Template(x => x.ItemId.Equals(Model.Id))
.ClientTemplate("<input type='checkbox' checked='<#=????? #>' disabled />");
})
Maybe there’s another way to achieve this?
For this particular case, you don’t have to use
Template. You can use the embedded databound functionality (as mentioned by Daniel) of the ClientTemplate to achieve what you want,This way you passed the variable
Model.Idfrom the server, while the actual comparison is down using Javascript at the client side.