S
Smith
The radio buttion was added to the gridview like this:
private void Grid_RowDataBound( Object sender, GridViewRowEventArgs e )
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Group group = (Group)e.Row.DataItem;
PlaceHolder holder = (PlaceHolder)e.Row.FindControl("_holder");
String innerhtml = String.Format("<input type='radio' name='sample'
value='{0}'>", group.Id);
holder.Controls.Add(TemplateControl.ParseControl(innerhtml));
}
}
Now, when my page loads, based on a session field which hold the index of a
previously selected row, i need to
check the radio button inside the selected row.
Grid.SlectedIndex = Convert.ToInt32(Session["gview_selectedindex"]) does
select the row.
Now i need to check the radio button inside.
Does anyone have an idea how to accomplish this?
Cheers
S
private void Grid_RowDataBound( Object sender, GridViewRowEventArgs e )
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Group group = (Group)e.Row.DataItem;
PlaceHolder holder = (PlaceHolder)e.Row.FindControl("_holder");
String innerhtml = String.Format("<input type='radio' name='sample'
value='{0}'>", group.Id);
holder.Controls.Add(TemplateControl.ParseControl(innerhtml));
}
}
Now, when my page loads, based on a session field which hold the index of a
previously selected row, i need to
check the radio button inside the selected row.
Grid.SlectedIndex = Convert.ToInt32(Session["gview_selectedindex"]) does
select the row.
Now i need to check the radio button inside.
Does anyone have an idea how to accomplish this?
Cheers
S