Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4786
  • Last Modified:

Setting a radiobuttonlist to readonly (not enabled=false)

Hello experts,
When a radio button list is set to enabled=false, the color of the text is a gray.  I want to have it stay black.  How do I do it.
Thanks
Howard
0
Howard Katz
Asked:
Howard Katz
  • 2
1 Solution
 
RedKelvinCommented:
Hi there

do it like this in VB
RadioButtonList1.Attributes("Onclick") = "return false;"

or C#
RadioButtonList1.Attributes["Onclick"] = "return false;";

if you are interested in the explanation, take a look at this
http://codebetter.com/blogs/peter.van.ooijen/archive/2005/09/28/132561.aspx

RedK
0
 
TommyTwoPintsCommented:
You could set the AutoCheck property to False
0
 
TommyTwoPintsCommented:
Sorry, ignore my comment. I didnt realise you were asking about asp.net. My solution is for winforms.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now