954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

RadioButtonList matter

Dear all .Netters,

I want my RadioButtonList can not be selected by users, so i set the Enable to be false. The problem is the font colour become gray.

so does any one of you can help me how to keep the font colour still black and can not be selected ?


Thanks and Regards,


Kusno

Kusno
Junior Poster
191 posts since Aug 2007
Reputation Points: 11
Solved Threads: 17
 

Try setting the font-color to black when you set enabled to false. :icon_wink:

Infarction
Posting Virtuoso
1,580 posts since May 2006
Reputation Points: 683
Solved Threads: 53
 

Finnaly, i find the answer. i use checkboxlist control, because there is a bug in radiolbuttonlist control when RepeatColumn is set to 2

if form_load :
If Not IsPostBack Then
ViewState("Chk") = 2
CheckBoxList1.SelectedIndex = 2
End If

and .....

Protected Sub CheckBoxList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxList1.SelectedIndexChanged
CheckBoxList1.SelectedIndex = ViewState("Chk")
End Sub

It will push the selectedindex value to the viewstate value.

Kusno
Junior Poster
191 posts since Aug 2007
Reputation Points: 11
Solved Threads: 17
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You