Board index » delphi » Cached updates - sorting rows in grid

Cached updates - sorting rows in grid

Suppose we have TQuery with "Order By" clause and we use
CachedUpdates to modify data. TDBGrid is used to present data.
As the user modifies or inserts rows, the order of rows doesn't
satisfy the sort criteria of query. The order of rows remains wrong
even after aplaying updates.

I tryed to use TTable with IndexFiedNames property and result is
the same.

Is there any way how to order rows with cached updates?

Thanks for any advice.

Jirka Kotal

 

Re:Cached updates - sorting rows in grid


Kotal,

Try to use TClientDataSet component to create cached updates and ordering
the result. When you use this component and set a IndexFieldNames property,
the VCL create a local index to order your data. See more information in
help.

Jean Ferreira
--------------------------------------
Technology Consultant
Delphi 3 Developer Certified
j...@gold.com.br

Quote
Kotal Jirka wrote in message <3574eff2.5316...@forums.borland.com>...
>Suppose we have TQuery with "Order By" clause and we use
>CachedUpdates to modify data. TDBGrid is used to present data.
>As the user modifies or inserts rows, the order of rows doesn't
>satisfy the sort criteria of query. The order of rows remains wrong
>even after aplaying updates.

>I tryed to use TTable with IndexFiedNames property and result is
>the same.

>Is there any way how to order rows with cached updates?

>Thanks for any advice.

>Jirka Kotal

Other Threads