CRDBGRID lookupfield order by columnclick

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
boudewijn

CRDBGRID lookupfield order by columnclick

Post by boudewijn » Mon 15 Aug 2005 12:22

Hi,

I'm using the CRDBGRD component with serveral MyQuery's and the MyConnection. I'm satisfied with it's general functions.

But:

Is it correct that it's impossible/not allowed to order/sort a CRDBGRID-column which held an lookup field?
If yes, is there a work-aroud?

I've searched the forum and the MyDac manual, but didn't find the answer.

Thanks in advance,

Boudewijn

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Tue 16 Aug 2005 09:17

TMyQuery cannot order/sort lookup fields. Therefore TCRDbGrid cannot perform this operation on TMyQuery. We do not plan to add this functionality in the nearest future.

boudewijn
Posts: 4
Joined: Fri 30 Sep 2005 18:13
Location: the netherlands

CRDBGRID lookupfield order by columnclick

Post by boudewijn » Thu 05 Apr 2007 14:28

Hi again,

I recent registered MyDAC 5.x

According to the feature-list my question about (local) sorting a lookupfield in a crdbgrid should now be possible.

Does this function need extra lines of code? It stil won't do. (sorting by clicking the column header)

regards,

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

Post by Antaeus » Fri 06 Apr 2007 08:04

Thank you for information. To solve this problem you should find the CRGrid.inc file in the MyDAC installation directory and replace the first line in this file:

Code: Select all

{ $DEFINE DAC450}
with the following line:

Code: Select all

{$DEFINE DAC600}
Note: this file is a part of the TCRDBGrid source code. It is available only for registered users.

Post Reply