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

Recommended Answers

All 2 Replies

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.