View previous topic :: View next topic |
Author |
Message |
esanabia
Joined: 29 Sep 2008 Posts: 23
|
Posted: Fri Aug 14, 2009 10:20 pm Post subject: Get Column Data |
|
|
This is probably a dumb question, but I cannot figure out how to get the column data from a select row. When a user double-clicks a row in the Virtual Treeview, I would like to open another form that contains data about the selected record. I have an "ID" column in the treeview that contain the ID of the record. How do I get the value of this row? I'm using vb.net.
Thanks. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Aug 15, 2009 12:33 am Post subject: |
|
|
Normally you use the VirtualTree.SelectedItem property to get the underlying object that the selected row in Virtual Tree is bound to. Then you can use the normal object properties.
So if you are binding to a strongly typed DataSet then you can do something like:
Code: |
Dim selectedItem As Object = _virtualTree.SelectedItem
If TypeOf selectedItem Is OrderDataSet.CustomersRow Then
Dim selectedCustomer As OrderDataSet.CustomersRow = selectedItem
Dim customerID As String = selectedCustomer.CustomerID
End If |
_________________ Infralution Support |
|
Back to top |
|
|
esanabia
Joined: 29 Sep 2008 Posts: 23
|
Posted: Sun Aug 16, 2009 4:28 pm Post subject: |
|
|
Thanks. |
|
Back to top |
|
|
|