ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Disable items in AjaxCheckboxList or Multiselect
Title:
B
I
{code}
?
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 ?
Save Changes
Cancel
mtugnoli
asked at 21 Mar 2019
Answers
B
I
{code}
?
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)
Save Changes
Cancel
Omu
answered at 21 Mar 2019
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK