Hello!
ultraGrid1.DisplayLayout.Bands[0].SortedColumns.RefreshSort(true);
method.
After call of this its will collapsed all expanded Groups.
For example:
(-) Prage (2 items)
row 1
row 2
(-) Brno (2 items)
row3
row4
Onec I add row 5 s City = Prage, and after call RefreshSort i see:
(+) Prage (3 items)
(+) Brno (2 items)
What can I do to keep collapsing state in its original.
Thank you.
The grid probably throws away the GroupByRows and creates new ones. If you are calling this method just so re-sort a single row, then maybe you just need to call RefreshSortPosition on the individual row rather than RefreshSort on the SortedColumns collection.
>The grid probably throws away the GroupByRows and creates new ones.
Its mean, that if some row throw it changes must go to other group, all groups will collapse?
I surmise that one calling RefreshSort has hi perfomance that several successive calls of RefreshSortPosition, and I have feeling, that RefreshSort can't change group of the row, and, for example, change the count of rows in group title?
I'll test this function and i shell write the result here.
anton_pavlov said: I'll test this function and i shell write the result here.
I have write simple application that clarify problem I have (see .zip attached).
Initial state is shown in pic1.jpg - there is two group with 6 element on each.
After I call change, one of rows will changes value from A to AAA (pic2.jpg).
Now I want to implemet action, on with application will regroup rows by new values. If I call RefreshSort, all groups have been collapsed (pic3.jpg).
Sources are in archive too.