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
1120
wintree with outlookexpress style
posted

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!

 

UltraTreeNode aNode;

// set tree column

UltraTreeColumnSet columnSet = new UltraTreeColumnSet();
columnSet.Key =
"ALL";
utree.ColumnSettings.ColumnSets.Add(columnSet);
UltraTreeNodeColumn col1 = new UltraTreeNodeColumn();
UltraTreeNodeColumn col2 = new UltraTreeNodeColumn();
UltraTreeNodeColumn col3 = new UltraTreeNodeColumn();
UltraTreeNodeColumn col4 = new UltraTreeNodeColumn();

col1.Key = "name";
col2.Key =
"last";
col3.Key =
"curr";
col4.Key =
"diff";

utree.ColumnSettings.RootColumnSet.Columns.Add(col1);
utree.ColumnSettings.RootColumnSet.Columns.Add(col2);
utree.ColumnSettings.RootColumnSet.Columns.Add(col3);
utree.ColumnSettings.RootColumnSet.Columns.Add(col4);

utree.ViewStyle = Infragistics.Win.UltraWinTree.ViewStyle.OutlookExpress;
aNode = utree.Nodes.Add("A");

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";

Parents
  • 469350
    Offline posted

     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. 

Reply Children