I’m trying to render customer html based on the column data. Say show “promotion image” if IsHavingPromotion = true.
Or render star rating image based on the value retrieved. How do i do it with KendoUI template?
.Columns(columns =>
{
columns.Bound(r => r.Id).Hidden(true);
columns.Bound(r => r.Name);
columns.Bound(r => r.GuestNumberMax).ClientTemplate("suitable for <strong>#= GuestNumberMax #</strong> pax");
columns.Bound(r => r.Description);
columns.Bound(r => r.IsHavingPromotion).ClientTemplate("# RenderIsHavingPromotion(this, IsHavingPromotion) #");
})
‘Or render star rating image based on the value retrieved’ , retrieved from where? Basically you can use external JavaScript function to handle your template:
I hope you got the idea.