Groups > Borland > Delphi winforms controls > Popluating Comboxbox from Datasource




Popluating Comboxbox from Datasource

Popluating Comboxbox from Datasource
Wed, 6 Sep 2006 15:06:22 +1000
Hello All,

I am trying to populate my combobox from datasource which is assigned from 
Arraylist and I am getting the following error:

Coud not bind to the new display member.'.

This is my code:

ALTrusteeType := ArrayList.Create;

ALTrusteeType.Add(TLookupClass.Create('Individual','0'));
ALTrusteeType.Add(TLookupClass.Create('Company','1'));

NF_TrusteeTypeComboBox.DataSource := ALTrusteeType;
NF_TrusteeTypeComboBox.DisplayMember := 'Name';
NF_TrusteeTypeComboBox.ValueMember := 'Value';


TLookupClass has 2 properties Name and Value.

Thanks for your help.
Regards,

Mohamad 

Post Reply
about | contact