Showing posts with label series. Show all posts
Showing posts with label series. Show all posts

Wednesday, March 21, 2012

UpdatePanel and RadioButtons

I have a series of RadioButton controls, each with a unique ID, each set to AutoPostBack, followed by an UpdatePanel with a set of event triggers, one for each RadioButton control, aimed at the "CheckedChanged" event. The RadioButton controls all belong to the same group and the first RadioButton is set to Checked true.

Clicking all but the first RadioButton causes the UpdatePanel to update, as expected. However, clicking the first RadioButton does nothing. If I remove the Checked="true" attribute from the first RadioButton, I get the desired behavior.

This is with July CTP.

-MT

This problem is still present in AJAX Beta1!

-MT


I think that your radio button list is outside the update panel. If that is the case, than the issue you have mentioned is by design.
Note that on an async post, only the controls which are inside the update panel gets updated. The radio button list is outside the update panel and hence it wont get updated.

What you can do instead is put the radio button list inside another update panel and set the UpdateMode of that updatepanel to conditional.
This would ensure that the radio button list is updated on every checkchange event.

vineetc


vineetc:

I think that your radio button list is outside the update panel. If that is the case, than the issue you have mentioned is by design.
Note that on an async post, only the controls which are inside the update panel gets updated. The radio button list is outside the update panel and hence it wont get updated.

What you can do instead is put the radio button list inside another update panel and set the UpdateMode of that updatepanel to conditional.
This would ensure that the radio button list is updated on every checkchange event.

vineetc

Vineetc, thank you for sounding in. I am pretty sure you are describing a different scenario. What I described should work (and, for the most part, does). I think there is a bug with handling a radiobutton that is set from the beginning.

-MT


Can you post the code

vineetc


vineetc,

This may be an old post but your solution worked great for me. Thanks.