Hello,
as far is I know sorting in a ClientDataSet works over the indexDefs. I can add an indexDef, set the field(s) I want to sort, and over the ixDescending property I can define the direction to sort.
I have a ClientDataSet connected to a dataSource which is the source for a DBGrid. When I now insert a new record in the ClientDataSet, it's either inserted at the top of the table (ixDescending = false) or at the bottom of the table (ixDescending = true).
But I want a descending order AND new records should be at the top at the table - not at the bottom. I tried to change the the indexDefs at runtime to achieve this - but without success. Somebody has an idea how to do this?