U
UJ
Before I even start, let me say I'm an idiot and get that out of the way.
I've search the help file, searched the newsgroups, search
support.microsoft.com and can't figure out what is wrong.
I have a listbox on a windows form that I'm attempting to bind to a
datatable. Here's the code I do:
lb_PossibleParents.DataSource = dtKitsList
lb_PossibleParents.DisplayMember = "CompanyName"
Looks like it should work right? Well it's not. The list box has row after
row that contains 'System.Data.DataRowView'
So what am I doing wrong? I'm sure it's something stupid.
I've also tried putting in a ValueMember property - and no matter what I put
in, I get an error message ( on that line ) 'Could not bind to the new
display member' even though I'm doing a ValueMemeber.
Can somebody please help me? This is driving me crazy!!!
UJ.
I've search the help file, searched the newsgroups, search
support.microsoft.com and can't figure out what is wrong.
I have a listbox on a windows form that I'm attempting to bind to a
datatable. Here's the code I do:
lb_PossibleParents.DataSource = dtKitsList
lb_PossibleParents.DisplayMember = "CompanyName"
Looks like it should work right? Well it's not. The list box has row after
row that contains 'System.Data.DataRowView'
So what am I doing wrong? I'm sure it's something stupid.
I've also tried putting in a ValueMember property - and no matter what I put
in, I get an error message ( on that line ) 'Could not bind to the new
display member' even though I'm doing a ValueMemeber.
Can somebody please help me? This is driving me crazy!!!
UJ.