Disable item in a RadioButtonList

B

Ben

Hello there,

Is it possible to disable an item in a RadioButtonList?

For eg.
rblType.Items.Add (new ListItem ("one" ));
rblType.Items.Add (new ListItem ("two" ));
rblType.Items.Add (new ListItem ("three" ));

disable selection on item 1 & 3.

Thanks,
Ben
 
J

Jan Hyde

Ben <[email protected]>'s wild thoughts were
released on Thu, 25 May 2006 02:59:03 -0700 bearing the
following fruit:
Hello there,

Is it possible to disable an item in a RadioButtonList?

For eg.
rblType.Items.Add (new ListItem ("one" ));
rblType.Items.Add (new ListItem ("two" ));
rblType.Items.Add (new ListItem ("three" ));

disable selection on item 1 & 3.

You could set the item's Enabled property to false......



Jan Hyde (VB MVP)
 
B

Ben

I've tried: rblType.Items[1].Enabled = false;
but encounter compilation error: 'System.Web.UI.WebControls.ListItem' does
not contain a definition for Enabled.

Is something missing? I'm using .NET Framework 1.1
 
J

Jan Hyde

Ben <[email protected]>'s wild thoughts were
released on Thu, 25 May 2006 19:16:02 -0700 bearing the
following fruit:
I've tried: rblType.Items[1].Enabled = false;
but encounter compilation error: 'System.Web.UI.WebControls.ListItem' does
not contain a definition for Enabled.

Is something missing? I'm using .NET Framework 1.1

Ah, that could explain it, I'm use 2.0 - sorry about that




Jan Hyde (VB MVP)
 
B

Ben

Thanks for the info.


Jan Hyde said:
Ben <[email protected]>'s wild thoughts were
released on Thu, 25 May 2006 19:16:02 -0700 bearing the
following fruit:
I've tried: rblType.Items[1].Enabled = false;
but encounter compilation error: 'System.Web.UI.WebControls.ListItem' does
not contain a definition for Enabled.

Is something missing? I'm using .NET Framework 1.1

Ah, that could explain it, I'm use 2.0 - sorry about that




Jan Hyde (VB MVP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top