3 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 06 Jan 2009, 03:50 AM
Hi Toby,
Try the following code snippet to achieve the desired scenario.
ASPX:
CS:
Thanks
Shinu.
Try the following code snippet to achieve the desired scenario.
ASPX:
<telerik:GridTemplateColumn UniqueName="TempCol" HeaderText="TempCol" > |
<ItemTemplate> |
<asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="True" OnCheckedChanged="RadioButton1_CheckedChanged" /> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
CS:
protected void RadioButton1_CheckedChanged(object sender, EventArgs e) |
{ |
RadioButton radbtn = (RadioButton)sender; |
GridDataItem item = (GridDataItem)radbtn.NamingContainer; |
item.Edit = true; |
RadGrid1.MasterTableView.Rebind(); |
} |
Thanks
Shinu.
0

Alejandro Resendiz
Top achievements
Rank 1
answered on 18 May 2010, 11:20 PM
hi shinu
how can i call javascript function
when radio button 1 checked changed
when radiobutton
without postback
how can i call javascript function
when radio button 1 checked changed
when radiobutton
without postback
0

Shinu
Top achievements
Rank 2
answered on 19 May 2010, 06:49 AM
Hello Alejandro,
Try the following code snippet to attach "onclick" event to RadioButton and to pass the row index to the client event handler. You can then access corresponding row/item using the index passed.
C#:
Java Script:
Regards,
Shinu.
Try the following code snippet to attach "onclick" event to RadioButton and to pass the row index to the client event handler. You can then access corresponding row/item using the index passed.
C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
{ |
GridDataItem item = (GridDataItem)e.Item; |
RadioButton btn = (RadioButton)item.FindControl("RadioButton1"); |
btn.Attributes.Add("onclick", "CheckedChanged('"+item.ItemIndex+"');"); |
} |
} |
Java Script:
<script type="text/javascript"> |
function CheckedChanged(index) { |
alert(index); |
} |
</script> |
Regards,
Shinu.