public MyTreeData(MyTreeData parent, object[] cells) { // Specifies the parent node for the new node. this.parentCore = parent; // Provides data for the node's cell. this.cellsCore = cells; if (this.parentCore != null) { this.parentCore.childrenCore.Add(this); } }
void InitData() { MyTreeData treeDataSource = new MyTreeData(null, null); MyTreeData rootNode1 = new MyTreeData(treeDataSource, new string[] { zExamples.GetType().ToString(), "All Examples" }); foreach (MethodInfo mi in zExamples.GetMethods()) { if (mi.Name == "GetMethods" || mi.Name == "InvokeMethod") { continue; } string[] nodeValue = new string[2]; nodeValue[0] = mi.Name; MyTreeData data = new MyTreeData(rootNode1, nodeValue); } treeList1.Columns.Add(new TreeListColumn() { Caption = "Action", VisibleIndex = 0, SortOrder = SortOrder.Ascending }); treeList1.DataSource = treeDataSource; treeList1.ExpandAll(); }