.cs
protected void Button1_Click(object sender, EventArgs e)
{
Button b1 = (Button)sender;
GridViewRow gr = (GridViewRow)b1.NamingContainer;
int index = gr.RowIndex;
GridView1.EditIndex = index;
bind();
}
Removing radiobutton items from top
protected void Button1_Click(object sender, EventArgs e)
{
foreach (GridViewRow gr in GridView1.Rows)
{
RadioButtonList r1 = (RadioButtonList)GridView1.Rows[gr.RowIndex].FindControl("RadioButtonList1");
r1.Items.RemoveAt(0);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Button b1 = (Button)sender;
GridViewRow gr = (GridViewRow)b1.NamingContainer;
int index = gr.RowIndex;
GridView1.EditIndex = index;
bind();
}
Removing radiobutton items from top
protected void Button1_Click(object sender, EventArgs e)
{
foreach (GridViewRow gr in GridView1.Rows)
{
RadioButtonList r1 = (RadioButtonList)GridView1.Rows[gr.RowIndex].FindControl("RadioButtonList1");
r1.Items.RemoveAt(0);
}
}

