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
1300
Ig Grid checkbox issues
posted

In my ig grid there are  3 check boxes in each row and user can check any  one check box from them but only one check box should be checked at a time in a row  . i.e., Need to uncheck previous check boxes except the current clicked one.

please try to provide me solution for implementing the above criteria.

Parents
  • 23953
    Suggested Answer
    Offline posted

    Hello Shahin,

    This can easily be achieved by a custom editor provider. Basically the idea is to create a input type='radio' editor provider with the same 'name' attribute for the columns which need to be mutually exclusive. However this solution can work only in editMode = "row", because in this mode all the editors are visible at the same time.

    Attached you can find a sample which implements custom editor provider named "EditorProviderRadio" . Also because editor providers are visible only in edit mode I've added a formatter function for each of the boolean columns in order to show a radio buttons instead of a checkbox, but this is just a matter of preference.

    For the custom editor provider I chose to use radio buttons instead of checkboxes, because they have the mutual exclusive functionality out of the box, while the checkboxes  will need much more additional custom code.

    Best regards,
    Martin Pavlov
    Infragistics, Inc.

    igGridUpdating_CustomEditorProvider_Radio.zip
Reply Children