473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DisplayMember is being ignored

Hi,

I have the following code to set the DataSource of a ComboBox to a certain
table in an untyped DataSet, and I also want to set the DisplayMamaber of the
ComboBox to a certain column:

cmbID.DataSource = Me.Ds.Tables("Groups")
Dim str As String = Me.Ds.Tables("Groups").Columns("CustomerID").Colum nName
Me.cmbCustomerID.DisplayMember = str

Problem is, I have stepped through this code, and str is assigned the value
"CustomerID". I then step over the line where str is assigned as the
DisplayMember. However, the value of DisplayMember remains at "". The
ComboBox is populated with the appropriate number of items, but each simply
says "System.Data.DataRowView".

Any ideas? The code was fine, no changes were made, it just suddenly
doesn't like it. I then changed some code in another class, ran it, and the
ComboBox populated fine. I Ran it again, broken again. Most baffling.
May 24 '06 #1
0 803

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dianna K | last post by:
I have a combo box which is set up as such: Me.cboGenre.DataSource = Ds.Tables("Genre") Me.cboGenre.ValueMember = "genre_id" Me.cboGenre.DisplayMember = "genre_description" The above loads...
1
by: Irwin M. Fletcher | last post by:
ListBox DataSource DisplayMember Property Problems in C# I have a (single select) listbox with data and when I click on the list I can't get the right text selected. My listbox is setup...
0
by: Alpha | last post by:
Hi, I have a listbox with displaymember that I combined 3 columns together. After the user made the selection I then need to get each one the of the selected valuemember but then I don't want the...
1
by: Chris | last post by:
I've created an aspx page that should time out every time it is executed, yet it never does. It seems as though the value of Server.ScriptTimeout is just being ignored by asp.net - I've also set...
1
by: Marcos Ribeiro | last post by:
I Have a ListBox that uses an ArrayList with objects as DataSource The objects are added to the ArrayList using a Database If I Add/Delete any item on the ListBox, the ArrayList is rebuilt with...
1
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
0
by: frank | last post by:
Hello, I have a listbox which is bound to a datatable. I have set the displaymember and valuemember and all works well: the user dbl clicks an item in the list box, I use the valuemember to...
2
by: frank | last post by:
Hello All, I know this is a re-post, but I didn't get any bites on my last post. So here goes again: I have a listbox which is bound to a datatable. I have set the displaymember and valuemember...
5
by: =?Utf-8?B?QmVu?= | last post by:
How would you add an item with its DisplayMember and ValueMember without binding to a datatable or dataview like: listbox.DisplayMember = "name"; listbox.ValueMember = "recid"; listbox.DataSource...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.