Sunday, March 11, 2012

Radio buttons dont work when used in an Accordian control.

Hi Michaej,

I looked into this problem ....

This is the cause:

when an asp:radiobutton gets rendered, it will actually be an input-htmlControl with type=radio

Yes. That is the problem. When Ajax renders the controls in the returned html it renames the "ID"s and if you put some normal radio buttons on apage (not in an accordian control) with the same GroupName they get rendered in the returned html all with the same "name". Thats the problem. When I put the three radio buttons in the accordian control it doesn't render them with the same "name" like it normally would. So I think there must be an error or problem in the Ajax control.

I thank you for trying to figure it out. Using the html input controls almost works. If the accordian control didn't fire when you clicked on the text, that would have probably been good enough.

Unless someone else has an idea I'm probably just going to use the accordian control without the radio buttons. I just think the radio buttons make it clearer which area is selected.

Thanks,

Jay


Hi Jay,

michaej:

I thank you for trying to figure it out. Using the html input controls almost works. If the accordian control didn't fire when you clicked on the text, that would have probably been good enough.

This is probably doable ... but not that userfriendly.

michaej:

Unless someone else has an idea I'm probably just going to use the accordian control without the radio buttons. I just think the radio buttons make it clearer which area is selected.

If I were you, let the radio's out!!!

Just style it with CSS. Look at the toolkit sample site. There you can see which one is selected because you have a brighter color.
And if you are a CSS guru ... wouldn't it be possible to use radiobutton-like images? Empty ones in the collapsed style, filled ones in the expanded style? That would give a nice radio'buttonish effectWink

Kind regards,
Wim

No comments:

Post a Comment