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 

Example of Selection Needed

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



Joined: 27 May 2007
Posts: 2

PostPosted: Mon Jul 09, 2007 7:16 am    Post subject: Example of Selection Needed Reply with quote

(Virtual Trees)

Hello,

Can you please provide an example, on how to programatically Select a single Row, and how to programatically get it's columns values.

Thanks in advance.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Jul 09, 2007 8:53 am    Post subject: Reply with quote

To programmatically select a row you would normally simply set the VirtualTree.SelectedItem property to the object the row is bound to. This will work provided each object from your data source corresponds to a unique position in the tree hierarchy and you have set up the parent/child hierarchy (see the "Simple Row Location Interface" section under "Working with Rows" in the online help for more detail). eg

virtualTree.SelectedItem = myObject

If an object can appear multiple times in the hierarchy then you need to find the VirtualTree Row object that corresponds to the row (using one of the VirtualTree.FindRow methods) and then set the VirtualTree.SelectedRow property.

Since you set up the binding between the object and the columns you should know which properties to call on your object to get the given column values. You could call the RowBinding.GetCellData method to retrieve the actual column data for a given row if you needed that.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
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