Page 1 of 1

CRDBGRID lookupfield order by columnclick

Posted: Mon 15 Aug 2005 12:22
by boudewijn
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

Posted: Tue 16 Aug 2005 09:17
by Paul
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.

CRDBGRID lookupfield order by columnclick

Posted: Thu 05 Apr 2007 14:28
by boudewijn
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,

Posted: Fri 06 Apr 2007 08:04
by Antaeus
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.