TTMSFMXGrid repeat sort of grid.
Version is 2.2.2.4 under Windows 8.
1. Programmatically generate rows in the grid.
2. Click on header.
I can see the triangle graphic in header cell.
The rows are sorted.
3. Programmatically generate rows in the grid.
I can see the triangle graphic in header cell.
4. Click on header. Perhaps click on header again.
I can see many blank rows at top then the sorted rows beneath.
I tried :-
var
ModeSave : TTMSFMXGridSortingMode;
begin
ModeSave := gridSearchTreeshts.Options.Sorting.Mode;
gridSearchTreeshts.Options.Sorting.Mode := gsmNone;
gridSearchTreesh*ts.Options.Sorting.Mode := ModeSave;
Unfortunately that did not fix the problem.
How can I "reset" the grid?
Regards,
Peter Evans
Can you use a BeginUpdate / EndUpdate to wrap your code of clearing the sortmode?
Kind Regards,
Pieter
Thank you for that reply.
I have now experimented and found a partial fix :-
1. At event FormShow save the property gridSearchTrees.RowCount
2. Restore RowCount before adding rows.
There is still the problem of the sort triangle graphic seen in a Header cell.
I can live with this. However it would be nice to remove any Header cell sort triangle graphics.
Regards,
Peter Evans