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

2 posts, 0 answers
  1. Brandon
    Brandon avatar
    10 posts
    Member since:
    Sep 2016

    Posted 02 Nov Link to this post

    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

  2. Orlin
    Admin
    Orlin avatar
    22 posts

    Posted 04 Nov Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top