Disable items in AjaxCheckboxList or Multiselect
Is it possible to prevent user remove some items in AjaxCheckboxList or Multiselect ? In my application the administrator must configure the user's profile by entering/removing the roles assigned to him, but must not remove the basic role (a role must always remain on the list) Is it possible ?
asked at 21 Mar 2019
we don't have such feature right now but there are several things that you can do: - put that item outside of the control (multiselect / checkboxlist), just some text in a div/span above the control - handle the change event and if it was removed add it back - for the ajaxcheckboxlist you could handle the `aweload` event and add disabled attribute to the checkbox you need with jquery - server validation (which you need regardless)
answered at 21 Mar 2019
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our