Reputation: 474
I am using Infragistics WebDataGrid to display data. I want to select first row by default. I tried following code for the same but not working
SelectedRowCollection selectedRows = gvHospital.Behaviors.Selection.SelectedRows;
selectedRows.Add(this.gvHospital.Rows[1]);
Any suggestion?
Upvotes: 0
Views: 904
Reputation: 148
Well, the first row would be index 0, wouldn't it? :) Also, make sure you have supplied a data source and bound the grid first.
Upvotes: 0