|
-
Jul 13th, 2005, 03:45 AM
#3
Thread Starter
New Member
Re: J#.NET - XML -> ListBox
 Originally Posted by nebulom
Specify what Table, not a DataSet. Also set the DisplayMember as the attribute you want to display.
DataSet ds=new DataSet();
ds.ReadXml("Items.xml");
listBox1.set_DataSource(ds.get_Tables().get_Item(0));
listBox1.set_DisplayMember("name");
Thanks. That worked very well. I've been studying that code trying to work out how I could read another value into a string, but I can't seem to work it out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|