Hey all.
I am brain dumping right now, and can't figure this out...
I have a list box that was databound to a table in the form load
(Private dtTeam As DataTable)
Now, I need to loop through the selected items, and add the ValueMember field (NOT the text) of the selected item to another datatable.
Here is what I have came up with...but I don't know how to get the value member.
VB Code:
If lbxTeam.SelectedItems.Count > 0 Then For i As Integer = 0 To lbxTeam.SelectedItems.Count - 1 drRow = dsData.Tables("Teams").NewRow() drRow("EntityID") = lbxTeam.SelectedItems.Item(i) '????????????????? dsData.Tables("Teams").Rows.Add(drRow) Next End If
This should be super simple, but I have been asp.net developing for a long while, and don't remember.




Reply With Quote