Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get Column Data

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
esanabia



Joined: 29 Sep 2008
Posts: 23

PostPosted: Fri Aug 14, 2009 10:20 pm    Post subject: Get Column Data Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sat Aug 15, 2009 12:33 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
esanabia



Joined: 29 Sep 2008
Posts: 23

PostPosted: Sun Aug 16, 2009 4:28 pm    Post subject: Reply with quote

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group