473,386 Members | 1,763 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,386 software developers and data experts.

DisplayMember property of ListBox control

Please consider the following code fragment:

// get a WSDL document from a given URL

HttpWebRequest request = (HttpWebRequest)
WebRequest.Create(ucWsdlUrlTextBox.Text);

HttpWebResponse response = (HttpWebResponse) request.GetResponse();

// load it into a WSDL XML document instance

iWsdlDocument.Load(response.GetResponseStream());

// bind data

ucWsdlBindingSource.DataSource =
iWsdlDocument.GetElementsByTagName("wsdl:types")[0].ChildNodes[0].ChildNodes;

ucTypesListBox.DisplayMember = "Attributes[\"name\"].Value";

The above doesn't work. Instead, the list box displays System.Xml.XmlElement
for every item. When I change DisplayMember property to one property only
(like Name for example) it works. How can I achieve what I want?

Thanks,

Sammy


Nov 17 '05 #1
0 1089

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

Similar topics

4
by: Jason | last post by:
Here is an odd issue. I am trying to shed some light on why this is causing a problem. I have an ArrayList. I am binding it to a ListBox control with has its Sort property set to True. If the...
0
by: Paul O | last post by:
I have a listbox which I want to populate with an array that I am returning from a WebService. My code is as follows GlossaryItem glossaryItems = webService.GetGlossaryItems(); lb1.DataSource...
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: JMe9ka | last post by:
I have a ListBox to which I am assigning a DataTable as a DataSource, as shown below. ======================================================= DataTable VendorData = new DataTable(); // Code...
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...
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...
0
by: derndeh | last post by:
I am using VS 2003. I have two tables, BookOrders and BookInfo. BookOrders holds order info which would contain a book Id. Book info will contain the details such as a books title. I want to...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.