Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a checkbox column to a Kendo grid

I'm trying to add a check box column to KendoUI grid. Here is the fiddle.

I have followed this post from the Kendo forum.
Can somebody please point out what I have done wrong here.

This is the relevant code:

data-columns = '[
    {"field":"Name", "filterable":true},
    {"field":"Price", "filterable":false},
    "UnitsInStock",
    {"field":"Recon"},
    "template": "<input type='checkbox' #= (Recon == true) ? checked ='checked' : '' # disabled />"
]'
like image 712
Geethanga Avatar asked Aug 31 '12 06:08

Geethanga


1 Answers

Change your columns to this:

[{"field":"Name", "filterable":true}, {"field":"Price", "filterable":false}, "UnitsInStock", {"field":"Recon", "template": "<input type=\"checkbox\" />" }]'

You had some errors in your syntax there, as well as some unescaped quotes.

Hope this helps.

like image 66
Logard Avatar answered Sep 27 '22 18:09

Logard