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

2-way binding of checkbox column.

1 Answer 267 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ole
Top achievements
Rank 1
Ole asked on 15 Aug 2012, 11:35 AM
Hi,

I am trying to bind(2-way) a boolean column to a checkbox,

So far I have managed to do it one way bind  like this:

columns.Bound(o => o.Status0).Width(40).Title("0").ClientTemplate("<input type='checkbox' value='true'  name='Status0_\\#=Id\\#'" + "\\#=Status0?'Checked':''\\#" + "/>");

 

How can I bind it 2 ways, do anyone have a sample of how to do that ?.

Thanks

Ole

 

1 Answer, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 10 Oct 2012, 10:00 PM
Has there been any update or resolution to this issue?  I am also trying to update a checkbox column within a Kendo grid (AJAX, Batch mode)...

I can get the grid to update the value if I don't use a template (not intuitive for the user that they have to click on the word "false" to get a checkbox to select) but if I use a checkbox template then the updating (saving) stops working.
Tags
Grid
Asked by
Ole
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Share this question
or