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 

Disable Expanding

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



Joined: 22 Oct 2010
Posts: 8

PostPosted: Mon Oct 25, 2010 9:56 pm    Post subject: Disable Expanding Reply with quote

Is it possible to disable the expanding of a row? I am building something similar to the file browser, but don't want the user to be able to expand the right pane, only the left. I am currently setting the right panes data source to match the selected node on the right. Is there an easy way to do this?

Thanks in advance,

Brian
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Oct 26, 2010 12:39 am    Post subject: Reply with quote

Yes to do this in the FileBrowser sample you would change FileList.GetChildrenForRow method so that it only returns children for the the _rootDirectory see code below:

Code:
protected override IList GetChildrenForRow(Row row)
{
    //if (!(row.Item is DirectoryInfo)) return null;
    //DirectoryInfo info = row.Item as DirectoryInfo;
    //if (!info.Exists) return null;

    DirectoryInfo info = row.Item as DirectoryInfo;
    if (info != _rootDirectory) return null;
    ....


You would also need to change the RowBinding.ChildPolicy for the Directories from LoadOnExpand to Normal. Otherwise you will still get the expand symbol appearing next to items. To change this you open the FileList control in the designer and click on the RowBindings property in the Property window. This will display the Virtual Tree editor. Select the directory RowBinding and change the ChildPolicy.
_________________
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