Normally I can loop through the rows like that
foreach ( var row in uGrid.Rows ) row.Cells["INCLUDE"].Value = true;
But when grid is in group-by mode row.Cells is null
Can you please advice how to loop rows when data is grouped ?
If you just want to loop through the data (non-groupby) rows in the grid, regardless of the number of levels of groupby, then the best thing to do is to use the grid.Rows.GetRowEnumerator method.
UltraGridGroupByRow exposes a Rows collection which contains its rows. When you iterate the UltraGrid.Rows collection, you can cast each row to typeof(UltraGridGroupByRow), then iterate that UltraGridGroupByRow's Rows collection in a separate loop.
Example:foreach( UltraGridRow row in this.ultraGrid.Rows ){ UltraGridGroupByRow groupByRow = row as UltraGridGroupByRow; if ( groupByRow != null ) { foreach ( UltraGridRow r in groupByRow.Rows ) { } }}