I deleted the line
ListBox1.DataSource = DS
I got the error "Cannot bind to the new value member" thrown on the line
.ValueMember = "CUSTOMER"
I deleted that line, and now things work as expected.
Thank you very much for the help, David. Now I need to hit the books
about data bindings and figure out what I just did <grin>.
If anyone has the title of a favorite "must have" VB.NET book, I'd
like hearing about it. If folks want to chime in with
recommendations, I'll compile a list and submit it as a item in the
U2UG knowledge-base.
Regards,
Clif
On May 13, 2008, at 10:58 PM, Hona, David S wrote:
Oh, delete the line with 'ListBox1.DataSource = DS' in it, I
forgot to!
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hona, David S
Sent: Wednesday, May 14, 2008 2:32 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] UniObjects.NET: populating ListBox from XML
Clif,
Try something like this...
Cmd = uvSession.CreateUniXML
Cmd.GenerateXML("SORT CUSTOMER COMPANY ID.SUP")
DS = Cmd.GetDataSet
ListBox1.DataSource = DS
With ListBox1
.DataSource = DS.Tables(0)
.DisplayMember = "COMPANY"
.ValueMember = "CUSTOMER"
End With
Regards,
David
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Clifton
Oliver
Sent: Wednesday, May 14, 2008 9:05 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] UniObjects.NET: populating ListBox from XML
Having been successful last week at populating a GridDataView control
using .GenerateXML, we naively thought using XML to populate a ListBox
would be just as straightforward. Using the same code pattern, we've
tried
Cmd = uvSession.CreateUniXML
Cmd.GenerateXML("SORT CUSTOMER COMPANY ID.SUP")
DS = Cmd.GetDataSet
ListBox1.DataSource = DS
ListBox1.DisplayMember = "CUSTOMER"
ListBox1.Refresh()
gives us one line in the ListBox that reads
System.Data.DataViewManagerListItemTypeDescriptor
Are we missing something from this incantation, or is this not a valid
way to try to populate a ListBox? (Yeah, I guess ComboBoxes are
next.)
Thanks in advance for any help, examples, or RTM references!
Regards,
Clif
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/