How to ovverride the css style of radiobutton list when disabled

Posted by Madhavi under C# on 5/21/2013 | Points: 10 | Views : 2366 | Status : [Member] | Replies : 1

All of us know that when we set the disabled = true for radionbutton list - its text and rdiobuttons will appear in grey color ( ash color). My intention is to make radionbutton list readonly wiht out the textcolor change. When we toggle between the enalble and disable its css style will change , changing the text color.

For example -
WHen you make text box readonly = true. THe text in textbox will not greyed out. It will be in black color , but will not allow user to change. Want to have similar feature for radionbutton list as wells as dropdownlist also.

Finally what I want is, whether radiobutton list is enabled or disabled. text color won't change. When disabled will not allow user to chekc the radiobuttons.

Is there anyone trodden the same path? Please help me onthis how to achieve.


Posted by: lakhansin-22735 on: 7/4/2013 [Member] Starter | Points: 25


Place this code in Page_Load event
radiobuttonList.Attributes["onclick"] = "return false;";

Don't know how much it will be helpful to you.

Lakhan Singh
Tech Lead
BeyondKey System Pvt. Ltd.
Indore, M.P.

Madhavi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response