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

Select grid row on page-load

1 Answer 175 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 10 Sep 2012, 11:37 AM
Hi
I want to programatically select the first row on page load. How do i do this. Please help out.
RT

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Sep 2012, 11:44 AM
Hi,

Try the following code snippet to make the first row selected.

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

Thanks,
Shinu.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or