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

Select row on load

1 Answer 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dawson
Top achievements
Rank 1
Dawson asked on 03 Dec 2013, 01:07 PM
Hi
 I always want a row to be selected when the grid loads.how to do this?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Dec 2013, 01:17 PM
Hi Dawson,

You can do this in the PreRender event to select the first row as follows:

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
  RadGrid1.MasterTableView.Items[0].Selected = true;
}


Check out the following help documentation for more on how to keep a row selected always.
http://www.telerik.com/help/aspnet-ajax/grid-selected-row-at-all-times.html

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