Home - Forums-.NET - FlyTreeView (ASP.NET) - Remove folder icons at leaf node level

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Remove folder icons at leaf node level
Link Posted: 16-Jun-2008 05:07
How can the default styles (MacOS in this case) be modified so that folders are not displayed at the leaf level? The nodes at this level in my app are checkboxes and a folder icon does not make sense. Seems like I need one style def for leaf nodes, without the ImageUrl="$macos_folder" and another for everything else but not sure how to achieve this. Any pointers much appreciated.


                    
                                                    IsCheckbox="True">
                                                                    
                    
                    
                                            Padding="2px;3px;3px;1px" RowHeight="18px" ImageUrl="$macos_folder"/>
                      
              


All nodes bound in one go with

IHierarchicalEnumerable hierarchicalData =
            NineRays.WebControls.FlyTreeView.ConvertTabularDataToHierarchical(table ,"ID", "ParentID");
        
      
        accessTree.DataSource = hierarchicalData;        
        NineRays.WebControls.FlyNodeBinding binding = new NineRays.WebControls.FlyNodeBinding();
        binding.TextField = "NodeText";        
        binding.ValueField = "TechnicalName";    
        accessTree.DataBindings.Add(binding);
        accessTree.DataBind();    
Link Posted: 16-Jun-2008 06:37
You need to add a DefaultStyle setting into your nodetype:
So It will look like this:

  
      
  
Link Posted: 16-Jun-2008 12:42
perfect, thanks