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 2 months ago
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 2 months ago
to leave an answer