[DUG] Query grid column details

Marshland Engineering marshland at marshland.co.nz
Tue Jan 11 08:51:11 NZDT 2011


I have an sql query. I have two db Grids on my form, one from the table and the other a query from the same table with conditions. 

The dbgApp is a standard db grid and the dbgQApp is a query on the table App. It all works correctly until I modify the query columns properties. 

If I use the Column editor or a line of code, I get an empty query grid. 


procedure TfDiary.FormShow(Sender: TObject);
begin
   dm.qApp.Close;
   dm.qApp.SQL.Text:='Select ID,Dat,DOW,Type,Summary,Status,DatComp from App Order by 2';
   dm.qApp.Open;
   dbgQApp.Columns[0].Visible:=False;  // Hides the whole table.  Incorrect 
   dbgApp.Columns[0].Visible:=False; // Hides the first Column. Correct
 end;

Is there an order in which this has to be done for it to work correctly?

Thanks Wallace 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110111/82c88aa4/attachment.html 


More information about the Delphi mailing list