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

Binding a check box to grid both in Inline editing and bacth editing mode.

1 Answer 1042 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 1
Leo asked on 20 Feb 2013, 08:07 AM
I am trying to bind a checkbox to a column in the grid. Actually I was able to display and ticked the check box according to the Boolean value when the datasource is being bound to the grid. but when I tried to do inline editing check box disappears. I used a template field to display the check box.

 template: '<input type="checkbox" #= Archived ? "checked=checked" : "" # ></input>'

but when click edit button it will turn in to a checkbox. I tried following demo

http://demos.kendoui.com/web/grid/editing-custom.html

but there is no way to bind a checkbox to it's container like .appendTo(container).kendoDropDownList(" 

Help me please with a code sample , if you can .


1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 22 Feb 2013, 08:43 AM
Hi Leonard,

 
For inline edit mode you should add the disabled  attribute to the column template and set the column field type to boolean - please check the example below:

<input type='checkbox' disabled='disabled' #= isAdmin ? checked='checked':'' # class='chkbx' />

schema: {
    model: {
        id: "UserID",
        fields: {
            isAdmin: { type: "boolean" },

 
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!
Tags
Grid
Asked by
Leo
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or