Is there a way to hide radio buttons inside a RadioButtonList control programmatically?
A:
If you mean with JavaScript, and if I remember correctly, you've got to dig out the ClientID properties of each <input type="radio" ...> tag.
Zack Peterson
2008-08-28 20:46:32
A:
Have you tried to hide it through the itemdatabound event onload or do you need it to hide after it loads?
RedWolves
2008-08-28 20:48:57
A:
Under the hood, you can access the attributes of the item and assign it a CSS style.
So you should be able to then programmatically assign it by specifying:
RadioButtonList.Items(1).CssStyle.Add("visibility", "hidden")
and get the job done.
Dillie-O
2008-08-28 20:52:07
A:
I havent tested it, id assume (for C#)
foreach(ListItem myItem in rbl.Items)
{
if(whatever condition)
myItem.Attributes.Add("visibility","hidden");
}
James Hall
2008-08-28 20:54:51
A:
Please Try This >>
RadioButtonList.Items.Remove(RadioButtonList.Items.FindByValue("3"));
Burak Yıldırım
2009-10-20 12:25:14