Jesus Reyes schrieb:

Which way is better? I think the Descending-sort code is always
identical: if SortOrder=soDescending then result:=-result; and it
could be better if users don't need to worry about it.

Juha


At first sight it seems to be a good idea however by doing this, we
couldn't say the grid support "custom" sorting but "limited custom"
sorting capabilities, because it's based on the interpretation of the
SortOrder property.

Because how would one sort multiple columns with different Sorting
orders, for example one column sorting alphabetically in ascending
order while at the same time another column, say a rate column, in
descending order, the same for dates, numbers, etc.

That's the task of OnCompareCells. Ascending/Descending only reverts the row order of the entire grid.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to