Allowing only one checkbox selection in wijmo grid

Posted by: nivishapanwar on 9 November 2020, 6:16 am EST

  • Posted 9 November 2020, 6:16 am EST

    Hello Team,

    How can we just allow only one checkbox to be selected in the grid. The code for that checkboxes is not present in html as those checkboxes are visible in the page after binding json data.

    Thank you.

    Regards,

    Nivisha

  • Posted 10 November 2020, 7:11 am EST

    Hi Nivisha,

    Can you please let us know which checkboxes are you are referring to? The main checkboxes are created for the boolean column because true/false values can easily be set with checkboxes. Another checkbox is the Selector checkbox which is added to the row headers and the top left cell. So, which one of these checkboxes are you using in your grid?

    As per my understanding, you must be using the boolean checkbox because they are added automatically. But, I was not able to completely understand your issue? Do you wish to enable only one checkbox for the entire boolean column?

    Regards,

    Ashwin

  • Posted 10 November 2020, 9:52 am EST

    Hi Ashwin,

    Yes , I am using boolean checkbox. The condition is that we should be able to select only one checkbox in the wijmo grid. So that data corresponding to that checkbox is only exported. We have multiple checkboxes in the grid and each checkbox have some corresponding data.

    The condition which is to be satisfied is only one checkbox should be selected at a time.

    Thank you.

    Regards,

    Nivisha

  • Posted 11 November 2020, 10:00 am EST

    Hi Nivisha,

    You can handle the rowEditEnded event of the FlexGrid to check whether the current checkbox is checked and iterate over all the other items and set them to false.

    Please refer to the sample link below for reference:

    https://stackblitz.com/edit/js-cziqjs

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels