datagridview winform tag only brings back the first row value
Posted
by jvcoach23
on Stack Overflow
See other posts from Stack Overflow
or by jvcoach23
Published on 2009-09-03T19:27:20Z
Indexed on
2010/05/10
2:08 UTC
Read the original article
Hit count: 349
I'm using visual studio 2008.
I have a datagridview in a winform. I've bound to it using an object
Private Sub LoadAllCampers()
Dim Os As List(Of LE.Camper) = Nothing
Dim Oc As New LE.Camper_Controller
Os = Oc.GetCamperData(0)
With Me.dgResults
.DataSource = Os
End With
CamperBindingSource.DataSource = Os
End Sub
I have a tag setup on the ID property within the Camper class. when i double click on a row in teh datagridview, i do a me.dgResults.tag and it always shows the first rows ID value. If i change the ordering within the class, it will display a different value, but it's always the first value in the datagridview.
I'm missing something simple to get this working.. just don't know what it is. Hopefully someone can spare a minute.
© Stack Overflow or respective owner