Is there a easy way to resort a column (or grid) according to the current sort order from code?
The only way I could find is to re-assigned the sorted property to the column that is currently sorted.
CODE
for I := 0 to nxGrid.Columns.Count -1 do
if nxGrid.Columns[I].Sorted then
nxGrid.Columns[I].Sorted := True;
if nxGrid.Columns[I].Sorted then
nxGrid.Columns[I].Sorted := True;
It works fine but it's a bit of a hack.
Maybe there is another way that I am missing? If not, could add a new method (NextGrid1.Sort) to re-sort the grid according to whichever column (if any) is currently sorted?
It would also be handy to be able to get the column index of the column that is currently sorted (NextGrid1.SortedColumn).
Thanks
Deon