I have used YourgridName.rows[0].selected= true did not work ??//
YourGrid.Select(YourGrid.Rows.Fixed,0);
YourGrid.Rows[YourGrid.Rows.Fixed].Selected = true;
Hello Bouzid,
Thank you for posting in our forum.
In order to select the first row in the grid you may use code like this:
this.ultraGrid1.Selected.Rows.Clear();
this.ultraGrid1.Selected.Rows.Add(this.ultraGrid1.Rows[0]);
Please note if you have applied filters to your grid you can use GetFilteredInNonGroupByRows method of the Row and get the first row of returned collection. You can use code like this:
this.ultraGrid1.Selected.Rows.Add(this.ultraGrid1.Rows.GetFilteredInNonGroupByRows()[0]);
More about GetFilteredInNonGroupByRows method you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v15.1~Infragistics.Win.UltraWinGrid.RowsCollection~GetFilteredInNonGroupByRows.html
Please note this will not change the active row. By default the active row and selected rows have same appearance so it will look like you have two selected rows. To set the active row of the grid to the first row you may use code like this:
this.ultraGrid1.ActiveRow = this.ultraGrid1.Rows[0];
or if you have filters in your grid code like this:
this.ultraGrid1.ActiveRow = this.ultraGrid1.Rows.GetFilteredInNonGroupByRows()[0];
Please let me know if you need any further assistance on this.
Hi Bouzid,
Similar to your other thread (http://ko.infragistics.com/community/forums/p/96125/474785.aspx#474785), is this thread also concerning the C1FlexGrid and not the Infragistics UltraGrid?