RefreshRecord causes associated grid to reload ALL data

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
markwt
Posts: 8
Joined: Wed 24 Jun 2009 15:45

RefreshRecord causes associated grid to reload ALL data

Post by markwt » Fri 31 Jul 2009 10:29

RefreshRecord refreshes a single record OK but I have found that since ultimately it calls Resync[] this dispatches the deDataSetChange data event. The deDataSetChange event causes my devExpress grids (and others I guess) to reload all Dataset data - firing all recalc events for dataset etc, etc.

This is a great shame, surely there must be a way to optimise the affects of this. I see from the source that there looks like an attempt has been made to reduce the affects but this is commented out.

Anybody have any ideas how to restrict the grid updates to the record being refreshed?

Thanks in advance.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 03 Aug 2009 07:01

The Resync method is called even if one record was changed. In this case resorting, filtering and similar operations should be done. Therefore RefreshRecord calls Resync.

markwt
Posts: 8
Joined: Wed 24 Jun 2009 15:45

Post by markwt » Mon 03 Aug 2009 11:20

Thanks for replying, can understand logic of this partcularly with regard to sorting.

Post Reply