This is a migrated thread and some comments may be shown as answers.

Grid with conditional checkbox

2 Answers 267 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 12 Feb 2014, 12:31 PM
Hi All,

Could someone please tell me what I'm doing wrong here.
All I want to do is display a checkbox if Resend is true?

columns.Bound(p => p.Id).ClientTemplate("#=Resend ? '' : '<input id=\"resend\" value='#=Id#' class=\"chkbxq\" type=\"checkbox\" />' #").Title("test");


2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 13 Feb 2014, 01:38 PM
Hi Tim,

I would recommend using a regular if statement as explained here. For example: 
ClientTemplate("#if(Resend){# <input id='resend' value='#=Id#' class='chkbxq' type='checkbox' /> #}#")

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tim
Top achievements
Rank 1
answered on 13 Feb 2014, 07:03 PM
That did it, thank you.
Tags
Grid
Asked by
Tim
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Tim
Top achievements
Rank 1
Share this question
or