G
Guest
I’m trying to populate a listbox with data that comes from my SQL server.
I’ve created the connection, filled the dataset and loaded the data adapter.
Apparently, I’m missing something because after this runs, what is populated
in the listbox is: “System.Data.DataRowView†for each record in my data
adapter.
When I click on one of the rows (which really doesn’t make sense) as I test
the rest of my routine, I’m able to trick it into showing me other data from
that row.
Below is the piece of code that I'm trying to use to load my listbox.
'Fill the data adapter
daEmployeeTree.Fill(dsEmployeeTree, "SuperInfo")
' create data view
Dim dv As DataView = dsEmployeeTree.Tables("SuperInfo").DefaultView
lbxEmployee.DataSource = dv
lbxEmployee.DisplayMember = "SuperInfo"
lbxEmployee.DisplayMember = dv.ToString
Can someone help me fill my listbox with meaningful data? As you can tell,
I’m new to this so any and all help is greatly appreciated.
Thanks,
I’ve created the connection, filled the dataset and loaded the data adapter.
Apparently, I’m missing something because after this runs, what is populated
in the listbox is: “System.Data.DataRowView†for each record in my data
adapter.
When I click on one of the rows (which really doesn’t make sense) as I test
the rest of my routine, I’m able to trick it into showing me other data from
that row.
Below is the piece of code that I'm trying to use to load my listbox.
'Fill the data adapter
daEmployeeTree.Fill(dsEmployeeTree, "SuperInfo")
' create data view
Dim dv As DataView = dsEmployeeTree.Tables("SuperInfo").DefaultView
lbxEmployee.DataSource = dv
lbxEmployee.DisplayMember = "SuperInfo"
lbxEmployee.DisplayMember = dv.ToString
Can someone help me fill my listbox with meaningful data? As you can tell,
I’m new to this so any and all help is greatly appreciated.
Thanks,