G
Guest
How can I populate a textbox from a dataview? I have a dataset i'm filtering
on and i want to populate several textboxes based on that filter.
How can i get that to work?
I've tried:
dsDetails = GetCars()
dvDetails = New DataView
With dvDetails
.Table = dsDetails.Tables(0)
.RowFilter = "CARMAKE=" & "'" & strModel& "'"
End With
txtName.DataBindings("NAME").ToString()
and i get this error(s)
Object reference not set to an instance of an object
or I get:
This would cause tow bindings in the collection to bind to the same property
Parameter name: binding
and i'm using this code
txtName.DataBindings.Add(New Binding("Text", dvDetails, "NAME"))
am I missing something or can this not be done?
on and i want to populate several textboxes based on that filter.
How can i get that to work?
I've tried:
dsDetails = GetCars()
dvDetails = New DataView
With dvDetails
.Table = dsDetails.Tables(0)
.RowFilter = "CARMAKE=" & "'" & strModel& "'"
End With
txtName.DataBindings("NAME").ToString()
and i get this error(s)
Object reference not set to an instance of an object
or I get:
This would cause tow bindings in the collection to bind to the same property
Parameter name: binding
and i'm using this code
txtName.DataBindings.Add(New Binding("Text", dvDetails, "NAME"))
am I missing something or can this not be done?