The following code just display the first level node A, I added B as A's child,but node B doesn't show up. Do you hev ideas?
Thasks!
// set tree column
col1.Key = "name";col2.Key = "last";col3.Key = "curr";col4.Key = "diff";
UltraTreeNode aaNode = utree.Nodes["A"].Nodes.Add("B");
aNode.Cells["name"].Value = "A";aNode.Cells["last"].Value = "432";aNode.Cells["curr"].Value = "401";aNode.Cells["diff"].Value = "31";
aaNode.Cells["name"].Value = "B";aaNode.Cells["last"].Value = "333";aaNode.Cells["curr"].Value = "222";aaNode.Cells["diff"].Value = "111";
it works for me too! Thanks a lot!!
It looks like you also need at least one column of type string to get the expansion indicators to show up. This code worked for me:
this.ultraTree1.ViewStyle = ViewStyle.OutlookExpress; UltraTreeColumnSet columnSet = new UltraTreeColumnSet(); UltraTreeNodeColumn column = columnSet.Columns.Add("A"); column.DataType = typeof(string); column = columnSet.Columns.Add("B"); column = columnSet.Columns.Add("C"); column = columnSet.Columns.Add("Child Nodes"); column.IsChaptered = true; this.ultraTree1.ColumnSettings.RootColumnSet = columnSet; UltraTreeNode aNode = this.ultraTree1.Nodes.Add("Root"); UltraTreeNode aaNode = aNode.Nodes.Add("Child"); aNode.Cells["A"].Value = "A"; aNode.Cells["B"].Value = "432"; aNode.Cells["C"].Value = "401"; aaNode.Cells["A"].Value = "B"; aaNode.Cells["B"].Value = "333"; aaNode.Cells["C"].Value = "222";
EDIT: Looks like I was wrong, you don't need a chaptered column.You just need at least one string column to get the expansion indicators to show.Or you could explicitly set the ExpansionIndicator column on the ColumnSet.
Could you porvide a coup of lines code for this?
Your ColumnSet doesn't contain any child band information. A child band is really just a special kind of column. What you need to do is add a column to your columnset that represents the child band and has it's IsChaptered property set to true.