This is a migrated thread and some comments may be shown as answers.

row to be selected on expanding

1 Answer 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryann
Top achievements
Rank 1
Ryann asked on 24 Dec 2013, 12:33 PM
Hi
i have a grid with detail table and on expanding a row i want that row to be selected.how to get this done.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Dec 2013, 12:44 PM
Hi Ryann,

Please try the following code snippet to select the expanded row:

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
  foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
  {
   if (item.Expanded)
    item.Selected = true;
  }
}

Thanks,
Princy
Tags
Grid
Asked by
Ryann
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or