This is a migrated thread and some comments may be shown as answers.
Updating boolean field in Kendo Grid
4 Answers 210 Views
This is a migrated thread and some comments may be shown as answers.
Jean-Francois
Top achievements
Rank 1
Jean-Francois asked on 23 Nov 2012, 06:46 PM
Hi,

I created an editable grid with a column containing a CheckBox using the following code : 

 columns.Bound(Function(c) c.Active).ClientTemplate("<input type='checkbox' #= Active ? checked='checked' : '' # />").Width("50px")

The checkbox is checked correctly when the value of the backing data is "true". However it doesn't work when I try to update this value. In other words, if I check the checkbox, the value sent to the controller is always "false".

What am I doing wrong ?

Thanks a lot

4 Answers, 1 is accepted

Sort by
0
Quest Resource Management
Top achievements
Rank 1
answered on 16 Jan 2013, 10:53 AM
Hi All,

I face same problem with check box value.
Please help us.

Thanks,
0
Vladimir Iliev
Telerik team
answered on 18 Jan 2013, 03:07 PM
Hi Jean,

 
There is such demo in our CodeLibrary about how to create a template column which displays checkboxes for a boolean value and how to change the underlying model with a single click. You can find this demo here.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Brady
Top achievements
Rank 1
answered on 03 Jun 2013, 07:11 PM
Why can't you just make a checkbox column that works? Why do we have to read and use code snippets and samples from everywhere? Kendo is now quite an expensive library, and I would expect something like a CheckBoxColumn to be included for the extremely common case of a column for a boolean value.
0
Vladimir Iliev
Telerik team
answered on 04 Jun 2013, 07:09 AM
Hi Bradly,

 
Please note that we already support checkbox as editor for boolean columns, however having a checkbox in display mode is not supported as it allows editing of the underlying model without entering edit mode which is as a custom scenario.

I would suggest to share your idea at KendoUI UserVoice to allow other users vote for it. Most voted ideas are included in next KendoUI releases.

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jean-Francois
Top achievements
Rank 1
Answers by
Quest Resource Management
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Brady
Top achievements
Rank 1
Share this question
or