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

[Solved] Select first row

2 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lim
Top achievements
Rank 1
Lim asked on 31 Jul 2009, 04:49 AM
How to select first row of the grid after the need data source event and each time changing the page of the grid?

For your info, the column in my grid is auto-generated.

Thanks.


2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 31 Jul 2009, 05:28 AM
Hello,

Try the following code snippet in PreRender event in order to select the first row of grid.

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

-Shinu.
0
Lim
Top achievements
Rank 1
answered on 31 Jul 2009, 07:25 AM
Thanks Shinu. Your suggestion is working. I just have to add a if condiction in that event to fulfill my requirement.
Tags
Grid
Asked by
Lim
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Lim
Top achievements
Rank 1
Share this question
or