Following are the steps to follow:
1. Consider there are 10 UltraGridGroupByRow rows in my layout.
2. I expanded 5th UltraGridGroupByRow row in my layout.
3. After this i click on refresh button, where all the UltraGridGroupByRow rows are collapsed(Even the ones which i expanded before clickin Refresh button . i.e. 5th row)
4. My 5th row is collapsed.
I need a solution to restore the expanded feature of a particular UltraGridGroupByRow even after Refresh action.
How i can go with this ?
Thanks in advance!
I am currently using the following code .
but this is not working as expected
foreach (UltraGridGroupByRow row in ultraGrid.Rows) { if (List.Contains(row.Value.ToString())) { row.Expanded = true; } }
Hi Sandesh,
Thank you for posting in our forums.
How are you refreshing your grid? I tried using the refresh methods of the grid (UltraGrid.Refrsesh and UltraGrid.Rows.Refresh) and the expanded group by rows aren’t collapsed. The only way I found to collapse them was saving and then loading the grid layout. After doing this I was able to re-expand the collapsed rows by keeping a list of the currently expanded rows and then using the InitializeGroupByRow event to restore their expanded state.
I have attached a sample which demonstrates this approach.
Let me know if you have any questions.
Thank you Dimitar! It is working now. The sample application which was attached helped a lot.