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

Default row

2 Answers 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nataraj Vedula
Top achievements
Rank 1
Nataraj Vedula asked on 05 Nov 2008, 08:45 AM
Hi,

Can any one tell me how to make first row in the rad grid as default selected?

My requirement is once the grid was bound to the data, the first row should be highlighted as selected.

I am using skin web20. So for me the first row should be appeared in green color which indicates that it was selected already.

Thanks,
Nataraj

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 05 Nov 2008, 09:12 AM
Hello Nataraj,

Please choose the desired approach and let us know whether it fits your scenario:

server-side:
protected void RadGrid1_DataBound(object sender, EventArgs e) 
    RadGrid1.MasterTableView.Items[0].Selected = true

client-side:
function GridCreated(sender, args) 
    sender.get_masterTableView().get_dataItems()[0].set_selected(true); 
 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nataraj Vedula
Top achievements
Rank 1
answered on 05 Nov 2008, 09:14 AM
Thanks Daniel.

Regards,
Nataraj
Tags
Grid
Asked by
Nataraj Vedula
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Nataraj Vedula
Top achievements
Rank 1
Share this question
or