Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
How to disable unboundcheckbox field after particular selections
posted

Hi,

Am using unboundcheckbox field in my webdatagrid. I need to disable the checkbox after 20 selections. How can i achieve it with using the row updating event.

Thanks,

vignesh

Parents
No Data
Reply
  • 18204
    Suggested Answer
    Offline posted

    Hello Vignesh,

    Thank you for posting in our forums!

    If you are causing a postback each time a checkbox is selected, you could set a ColumnSetting so the column is set to ReadOnly.  This forum thread shows a simple example

    If you are not causing postbacks, you will need to handle this in javascript using the EditingCore's CellValueChanging event.  In this event, you can create your logic to check if the user has made 20 selections and then call eventArgs.set_cancel(true) to prevent other checkboxes from being checked or unchecked.  This forum thread provides an example of how you can handle the CellValueChanging event.

    Please let me know if you need further assistance with this and I will be glad to help.

Children