[Lazarus] DBGrid picklist error
Bob K.
rkamarowski at yahoo.com
Fri Jul 4 17:49:52 CEST 2008
Denis,
The keylist is not available. I can see it as a property in the columns,
but I'm unable to access it:
with RxDBGridCamera do
begin
Visible:=True;
Columns[0].Visible:=False;
Columns[1].PickList:=List;
Columns[1].KeyList:=List;
end;
rakphoto.pas(115,22) Error: identifier idents no member "KeyList"
--------------------------------------------------
From: "Denis Golovan" <d.golovan.ml at gmail.com>
Sent: Friday, July 04, 2008 11:18 AM
To: "General mailing list" <lazarus at lazarus.freepascal.org>
Subject: Re: [Lazarus] DBGrid picklist error
> On Thu, Jul 03, 2008 at 06:56:54PM -0400, Bob K. wrote:
>> Denis,
>>
>> I'm having the same problem with RxDBGrid. Are you not having this
>> problem?
>>
>> bob k.
>>
>
> Use KeyList/PickList properties, and fill them on form show (or create).
> Something like the following^
>
> procedure TfrmOrderGoods.DealerPickListFill;
> var SQL:TSqlite3Dataset;
> C:TRxColumn;
> begin
> C:=grdBusket.ColumnByFieldName('Dealer');
> C.KeyList.Clear;
> C.PickList.Clear;
>
> SQL:=nil;
> try
> SQL:=BaseConnect.DatasetCreate('select d.id, d.Name from Dealers d
> order by d.Name');
> while not SQL.EOF do
> begin
> C.KeyList.Add( SQL.FieldByName('id').AsString );
> C.PickList.Add( SQL.FieldByName('Name').AsString );
> SQL.Next;
> end;
> finally
> SQL.Free;
> end;
> end;
>
> --
> Best regards,
> Denis Golovan aka MageSlayer
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list