Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

DisplayMember of ComboBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rod - 11 Apr 2005 10:09 GMT
If I set up a combo box at design time it works just fine.

Now if I place the following 3 lines in the form load procedure (I know they
are correct because they were copied from InitializeComponent)
The first line is obeyed, but the second line is ignored. I know this
because if I look at "DisplayMember" in debug mode I see what it was set to
at design time.

the 3rd line normally causes it to crash, but I guess if I understood what I
was doing wrong with the 2nd line I could figure the rest out.

--------------------

Me.cmbobxFilterLookup.DataSource = Me.datasetFilter.Membership_Status

Me.cmbobxFilterLookup.DisplayMember = "Membership Status"

Me.cmbobxFilterLookup.ValueMember = "Membership Status"

------------------------

Many thanks in advance

Rod
Alex Passos - 11 Apr 2005 19:48 GMT
Have you tried "Membership_Status" for your DisplayMember? Not that this is
implied from your code which I cannot imply a whole lot but your
display/value members must map to valid column names on your source.

Alex

> If I set up a combo box at design time it works just fine.
>
[quoted text clipped - 23 lines]
>
> Rod
Rod - 12 Apr 2005 09:00 GMT
Yes, and to me really sure that it was right I tried
Me.cmbobxFilterLookup.DisplayMember =
Me.datasetFilter.Membership_Status.Membership_StatusColumn.ColumnName

It correctly sets the DataSource but it just ignores the DisplayMember line.

> Have you tried "Membership_Status" for your DisplayMember? Not that this is
> implied from your code which I cannot imply a whole lot but your
[quoted text clipped - 29 lines]
> >
> > Rod

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.