I'm trying to disable the radiobuttonlist and dropdownlist for certain users on a site. When the radionbuttonlist and dropdownlist are disabled(greyed out), its hard to read. Is there another way I can handle this? Can this be done with JavaScript?
Printable View
I'm trying to disable the radiobuttonlist and dropdownlist for certain users on a site. When the radionbuttonlist and dropdownlist are disabled(greyed out), its hard to read. Is there another way I can handle this? Can this be done with JavaScript?
Hey,
I guess it depends on what you are trying to achieve.
Is it the case that the user shouldn't be able to see the radiobuttonlist, or that they shouldn't be able to edit it. For instance, can you simply not allow the user to visit the page that the radiobuttonlist is on. Or, rather then rendering it as a radiobuttonlist, can you not simply render it as a bulletedlist.
Hope that helps!!
Gary
I don't think you can change the CSS of a disabled field, but on the other hand, you could make the fields "readonly" and then set a custom CSS style so that the users can still click on it, but nothing should happen (and in your code, you should ignore it too).