How to do a CRDBGRID refresh?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
NetSupport
Posts: 5
Joined: Wed 06 Jun 2007 20:08

How to do a CRDBGRID refresh?

Post by NetSupport » Thu 27 Sep 2007 10:49

Hi :D ,

I use a CRDBGRID, but cannot refresh programmatically. Using DBNAVIGATOR, it works fine.

Does anyone know how to refresh programmatically? CRDBGRID.refresh does not work.

with kind regards,

Ruud

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 27 Sep 2007 11:40

The TCRDBGrid has no mechanism to refresh data. You should call the Refresh method of the underlying DataSet. It may look like this:

Code: Select all

   CRDBGrid1.DataSource.DataSet.Refresh;

NetSupport
Posts: 5
Joined: Wed 06 Jun 2007 20:08

Thanks! It works!

Post by NetSupport » Thu 27 Sep 2007 11:49

Antaeus wrote:The TCRDBGrid has no mechanism to refresh data. You should call the Refresh method of the underlying DataSet. It may look like this:

Code: Select all

   CRDBGrid1.DataSource.DataSet.Refresh;
Thanks, Anateus! It works!

Your quick reply is appreciated!

Post Reply