🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.winforms.controls.using
Article #242

Popluating Comboxbox from Datasource

#242
From: Mohamad El-Sayed
Date: Wed, 06 Sep 2006 05:06
25 lines
1462 bytes
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 
Technical Details
Message-ID: <44fe574a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,7507e271c3db166,start
X-Google-Attributes: gid1eff29,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mohamad El-Sayed" <msayed75@hotmail.com>
Newsgroups: borland.public.delphi.winforms.controls.using
Subject: Popluating Comboxbox from Datasource
Date: Wed, 6 Sep 2006 15:06:22 +1000
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 165.228.74.44
Message-ID: <44fe574a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1157519178 165.228.74.44 (5 Sep 2006 22:06:18 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail