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 all dataviews

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



Joined: 27 Jun 2006
Posts: 15
Location: Switzerland

PostPosted: Tue Nov 13, 2007 3:11 am    Post subject: get all dataviews Reply with quote

hello,

on a part of my code i would like to iterate over all rows shown in the tree. because i don't know what the datasource of the tree is, i would like go get the used dataview of every datatable shown in the tree. i could get the datatable, but i can not be sure that the tree really shows all its data because it could use a dataview with a filter.

could you explaine me how i can get all dataviews or how i can get the data shown in the tree on a other way?

thanks very much
jürg
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Nov 13, 2007 7:11 am    Post subject: Reply with quote

There are a couple of different ways you can iterate over the rows. One is to get a list of all the visible rows by calling

Code:
VirtualTree.GetRows(VirtualTree.FirstIndex, VirtualTree.LastIndex)


This only returns the rows that would be visible if you scrolled through the tree (ie their parent has been expanded). If you want to find all possible rows (including rows that haven't been expanded) then you would need to start from VirtualTree.RootRow and iterate over the child rows eg

Code:
Row row = _myTree.RootRow;
for (int i=0; i < row.NumChildren; i++)
{
    Row childRow = row.ChildRowByIndex(i);
}

To traverse the entire tree you would need to recursively iterate through the children of the child rows.
_________________
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