add radio buttons to datagrid:
id="RadioButton1" Text='hi' runat="server"/>
public void SelectOnlyOne(object sender,EventArgs e)
{
RadioButton rb = new RadioButton();
rb = (RadioButton) sender;
string sRbText = rb.ClientID;
foreach (DataGridItem i in DDLCon.Items)
{
rb = (RadioButton) i.FindControl ("RadioButton1");
rb.Checked = false;
if (sRbText==rb.ClientID)
{
rb.Checked = true;
}
}
}
No comments:
Post a Comment