Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Show checkbox in some levels... but not others
posted

I have an UltraTree (v 7.3) component on a windows form (VS 2005) that is bound to a .NET class with three properties (two string values and a boolean value).

The class structure is as follows:
public class TreeHierarchy : List<HierarchyItem>{}
public class HierarchyItem{}
HierarcyItem contains the three properties Name(string), Type(string), Check(bool); and two methods: public List<HierarchyItem> Child, public void AddChild(HierarchyItem hierarchyItem)

I populate the above classes as follows, and bind them to the ultraTree in the form load event...
TreeHierarchy treeHierarchy = new TreeHierarchy();
HierarchyItem hi = new HierarchyItem("A", "", true);
treeHierarchy.Add(hi);
hi.AddChild(new HierarchyItem("the quick brown fox", "Add", false));
hi.AddChild(new HierarchyItem("2", "Add", false));

hi = new HierarchyItem("B", "Delete", true);
treeHierarchy.Add(hi);
hi.AddChild(new HierarchyItem("1", "Delete", false));
hi.AddChild(new HierarchyItem("2", "Add", true));

ultraTree1.DataSource = treeHierarchy;

The following is achieved when the ColumnSetGenerated event is fired...
The "Type" property is bound to a valueList and displays images (Using the valueList.DisplayStyle = ValueListDisplayStyle.Picture; code).
The Check property is shown as a checkbox and is set to AllowCellEdit.Full.

The question that I have is...

Is it possible to have the checkbox show for some levels in the tree hierarchy but not in others?