Use of CRDBGrid with MyTable via ClientDatasets = Sort broke

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Sparky
Posts: 2
Joined: Thu 31 Jul 2008 15:44
Location: Watertown, SD

Use of CRDBGrid with MyTable via ClientDatasets = Sort broke

Post by Sparky » Thu 31 Jul 2008 16:13

Using CRDBGrid connected to a MyTable dataset via MyDataSource, all functionality of CRDBGrid available. But when connecting a MyTable dataset to MyDataSource through a ClientDataSet object via a DataSetProvider object which points to the MyTable. The functionality of the click on column header (button) becomes non-functional. It appears though that the button is still present, but the action or linkage is broken. Is there a workaround?

I would really like to keep the functionality of CRDBGrid as well as to pickup the aggregation capability and caching provided by the TClientDataSet component.

Mean while I'll do some checking in the CRDBGrid to see how the click on title works, but won't promise anything, as I'm a C++ programmer trying to debug Delphi.

Sparky
Posts: 2
Joined: Thu 31 Jul 2008 15:44
Location: Watertown, SD

More info & Questions

Post by Sparky » Thu 31 Jul 2008 18:50

In reviewing the source for CRDBGrid it appears as if it is due to a test for the DataLink's DataSet parent class type but unsure how "DataLink.DataSet" returns the parent type for a ClientDataSet. I'm assuming it's TCustomClientDataSet. So I probably need to override the method in TCRDBGrid named "Reorder" to perform the same operation as for the TMemDataSet, but use semicolons for IndexFieldNames when composing the St string.

Now for the real problem with doing the above, I'm using the C++ Builder 2007 and do not have the Delphi environment so I could recompile the component source. Is there some other way that I might be able to override the internal component method without recompile.

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

Post by Dimon » Tue 05 Aug 2008 09:32

You can change the source code of the TCRDBGrid component and recompile it from your project. C++ Builder 2007 allows to compile Pascal units.

Post Reply