views:

326

answers:

0

Hi,

I have a problem with OnCheckedChanged on a RadioButton wicht is located within a GridView like this :

<edititemtemplate>
<asp:RadioButton id="rdoFoutEdit" runat="server" enabled='<%# Bind("Akkoord_Enabled") %>' Checked='<%# Bind("Akkoord_Fout") %>' GroupName='<%# Bind("ID") %>' OnCheckedChanged="Fout_CheckedChanged" AutoPostBack="true" /> </edititemtemplate>

I have 3 of these radiobuttons with the same GroupName in each row of the Grid, when I select the radioButton rdoFoutEdit (see above) a Postback occurrs and I handle that in codebehind, that works. But then when I select another radiobutton in the same row and I subsequently select rdoFoutEdit again a Postback is NOT fired. Really weird.

I've tried a workaround in wich I set the OnClick event manually in the Fout_CheckedChanged like this :

rdo.Attributes.Add("onclick", String.Format("javascript:setTimeout('__doPostBack(\'{0}\',\'\')', 0)", rdo.ClientID.Replace("_", "$")))

wich does force a postback but doesn't fire Fout_CheckedChanged ??!

I hope someone here can help me to fix this problem.

regards, Jurjen.