basically, i just want the RadioButtonList without the radio button on it, i will code the rbl so that selected items have a different background color and make it look more professional, the radio buttons themselves i want to be able to get rid of in terms of apperance... if you know of any way to do it, please do let me know!
+1
A:
I can't think of any straightforward method without mixing some tricks with javascript.
This could be something you want:
Accessible, Custom Designed Checkbox and Radio Button Inputs Styled with CSS (and a dash of jQuery)
The image used to mimick the radio buttons:
o.k.w
2010-01-08 19:03:04
thanks but this doesn't get rid of the hollow circle to the left of the radio button
Erx_VB.NExT.Coder
2010-01-08 19:25:02
But those are images. See my updated answer. You can create your own hollow-less circles.
o.k.w
2010-01-08 19:32:00
i see what you're saying, thanks, will use this as a last resort, still looking for a lovely style="button: dissapear.and.dont.come.back" type css style :)
Erx_VB.NExT.Coder
2010-01-08 19:55:49
+2
A:
this helped me a lot:
http://www.ryanfait.com/resources/custom-checkboxes-and-radio-buttons/
tillinberlin
2010-01-08 19:14:54
thanks, this doesn't get rid of the hollow circle to the left of the radio button, however it is still a great resource and i have bookmarked it, will upvote you.
Erx_VB.NExT.Coder
2010-01-08 19:25:41
+1
A:
found a plausible solution...
<head runat="server">
<title>Test - Hide radio circles from radiobuttonlist</title>
<script type="text/javascript">
function hideRadioSymbol()
{
var rads = new Array();
rads = document.getElementsByName('list1'); //Whatever ID u have given to ur radiolist.
for(var i = 0; i < rads.length; i++)
document.getElementById(rads.item(i).id).style.display = 'none'; //hide
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="list1" runat="server">
<asp:ListItem Value="item1" Text="item1"></asp:ListItem>
<asp:ListItem Value="item2" Text="item2"></asp:ListItem>
</asp:RadioButtonList>
</div>
<script type="text/javascript">hideRadioSymbol()</script> //After list is completely rendered/loaded.
</form>
</body>
</html>
oh and btw, mvc is awesome, it's how asp.net should have been from the begining!!
Erx_VB.NExT.Coder
2010-01-10 12:10:22
as usual, stackoverflow just removed all of the html, not bad default logic for a code posting site!
Erx_VB.NExT.Coder
2010-01-10 12:13:39
Select the `101010` button to indent your code 4 spaces and preserve the formatting.
ChrisF
2010-01-12 16:33:58