Home Forums WinForms controls Xceed Grid for WinForms Recursive parameter of GetSortedDataRows Reply To: Recursive parameter of GetSortedDataRows

User (Old forums)
Member
Post count: 23064

If you set the recursive parameter to false, it will only return the DataRows for the group you are in. For example, if your master grid is group by a column, and you only want the rows in the first group, you would do this :
<i>
ReadOnlyDataRowList list = gridControl1.Groups[ 1 ].GetSortedDataRows( false );
</i>
Note that the following would return 0 data rows if all the rows are in groups :
<i>
ReadOnlyDataRowList list = gridControl1.GetSortedDataRows ( false );
</i>
GetSortedDataRows always return rows only for the grid you are in, i.e., it will not return the rows in the DetailGrids if you are at the master grid level. So if you want the sorted DataRows of a detail grid, you need to do something like the following :
<i>
ReadOnlyDataRowList list = gridControl1.DataRows[ 0 ].DetailGrids[ 0 ].GetSortedDataRows ( false );
</i>

Imported from legacy forums. Posted by André (had 3022 views)