dashley
Well-known member
Im using a bound combobox (vb.net 2005 / CF) that pulls data from my db and all works fine. I'm using the canned tableadapter and binding soucr etc..
The user picks an item and its stored in the db by its selectedvalue.
when the client goes back and recalls the record i want the same combobox to show the selected item as the one retrieved from the DB.
I keep getting "System.Data.DataRowView"
when I debug through the comboboxes item.count
gbl_location is the value pulled from the db. Its a string representing a hospital name.
I also have available the actual valued stored in the DB which is an iteger and its also the value in the combobox.
The user picks an item and its stored in the db by its selectedvalue.
when the client goes back and recalls the record i want the same combobox to show the selected item as the one retrieved from the DB.
I keep getting "System.Data.DataRowView"
when I debug through the comboboxes item.count
VB.NET:
For X = 0 To Me.CboLoc.Items.Count - 1
MsgBox(Me.CboLoc.Items.Item(X).ToString)
If Me.CboLoc.Items.Item(X).ToString = gbl_location.ToString Then
CboLoc.SelectedIndex = X
Exit For
End If
Next
gbl_location is the value pulled from the db. Its a string representing a hospital name.
I also have available the actual valued stored in the DB which is an iteger and its also the value in the combobox.