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

Grid Checkbox - Use 'Y' & 'N' instead of True / False

1 Answer 1014 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 02 Nov 2016, 06:39 PM

Hello,

I have a grid with checkboxes. I am using the template feature to show a checkbox if there is a checked flag. By default Kendo recognizes the true / false to enable the checkbox. I have type: boolean in the schema.

My problem: The datasource that is provided to me, will only display 'Y' or 'N' for these boolean values.

In edit mode, how can I keep the checkboxes but use the template to recognize these new values? Clicking edit will display a textbox instead of the checkbox (If I set the scheme to "string" so that the template will recognize the "Y" & "N" values. Please help!

http://dojo.telerik.com/AdUqE

1 Answer, 1 is accepted

Sort by
0
Orlin
Telerik team
answered on 04 Nov 2016, 07:41 AM
Extension settingsExtension settings

Hello Brandon,

What you need can be accomplished by using a custom editor. You can see a demo here: http://demos.telerik.com/kendo-ui/grid/editing-custom

And here is a dojo with your example: http://dojo.telerik.com/itUBI/2

Basically it uses a function on edit that creates a checkbox which is either checked or not based on the field value. Be aware that you need separate logic to turn the checkbox input back into a Y/N string either on the server or on the client side.

 

Regards,
Orlin
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Grid
Asked by
Brandon
Top achievements
Rank 1
Answers by
Orlin
Telerik team
Share this question
or