I have designated a GroupBy Row after I Set the DataSource on a Grid with 2 Bands.
If I Refresh the Grid, I obtain a list of Rows that are Expanded.
I pass and loop through all of the Grid Rows as a RowsCollection and add them to a List of Rows as follows.
RowsCollection)
rows
mExpandedRows
Then
'If oRow.Cells("IdClientLogonUser").Value.ToString = oSavedRow.Cells("IdClientLogonUser").Value.ToString Then
oRow.Expanded =
True
oRow.ChildBands SetLastFormat(oRow.ChildBands(0).Rows)
SetLastFormat(oRow.ChildBands(0).Rows)
Next
If
Sub
Afterward, the DataSource is reset, after which I then need to loop through the Grid Rows and Expand each row that has been added to mExpandedRows.
Hello Sam,
The UltraGrid does not keep any rows expanded after a reset of the DataSource because it has no way to be sure that the same rows still exist after the reset. What you are currently doing is the best way to keep rows expanded after a data source reset.