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

Selecting first result in a grid...

2 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rudie Chiu
Top achievements
Rank 1
Rudie Chiu asked on 01 Apr 2010, 12:24 PM
Hi

I am struggling to find the correct syntax to set the selected item of a grid...

I can do it to a list easily enough (lstDtTo.SelectedIndex = 0)

But not on the grid... Can anyone point me in the right direction..?

Thanks..!

Luke

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Apr 2010, 01:02 PM
Hello Rudie,

Try the following code snippet in order to select a particular item from grid.

C#:
 
RadGrid1.MasterTableView.Items[0].Selected = true

Also you can see the client side approach here.

Thanks,
Princy.
0
Rudie Chiu
Top achievements
Rank 1
answered on 01 Apr 2010, 01:52 PM
Hi Princy

Thanks for your help mate. Worked a treat..!

Cheers


Tags
Grid
Asked by
Rudie Chiu
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rudie Chiu
Top achievements
Rank 1
Share this question
or