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

Grid Column Template Checkbox only allow check on edit inline?

1 Answer 336 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 16 May 2013, 09:07 PM
I have a Kendo Grid with Inline Editing and the following for example:

.Editable(editable => editable.Mode(GridEditMode.InLine))

columns.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= ActionAssign ? checked='checked':'' # class='chkbx5' />").Title("Assign").Width(100);

How can I only show the template checkbox only when in edit mode but when now like True/False etc. as a label or something.  If that is too difficult then just disabling the checkbox.  I am having a hard time finding some basic functionality type examples online.

Thanks
Sean

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 18 May 2013, 09:33 AM
Hello Sean,


I am not sure that I understand the current implementation. If ActionAssign is a boolean property in the model, then you could bind the column to it.
E.g.
columns.Bound(p => p.ActionAssign);

The default behavior when binding a column to a boolean field is to display a checkbox as an editor template and a true/false value when the grid is not in edit mode.

Please let me know if this approach will work in the current scenario.

 

Regards,
Dimiter Madjarov
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
Sean
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or