Hi,I want a FreeForm WinTree (unbound) with a "Grid" in one node.
Sample Code:
ultraTree1.ViewStyle = ViewStyle.FreeForm; // Tree UltraTreeNode node1 = ultraTree1.Nodes.Add("1", "Node 1"); UltraTreeNode node2 = ultraTree1.Nodes.Add("2", "Node 2"); UltraTreeNode node3 = ultraTree1.Nodes.Add("3", "Node 3"); UltraTreeNode node4 = node3.Nodes.Add("3-1", "Node 3-1"); // Column Set UltraTreeColumnSet cs = new UltraTreeColumnSet(); UltraTreeNodeColumn nc1 = cs.Columns.Add("C1"); UltraTreeNodeColumn nc2 = cs.Columns.Add("C2"); nc1.Text = "Col1"; nc2.Text = "Col2"; ultraTree1.ColumnSettings.ColumnSets.Add(cs); // Grid Node UltraTreeNode nodeGrid = node2.Nodes.Add("2-1"); nodeGrid.Override.ColumnSet = cs; nodeGrid.SetCellValue(nc1, "Val1"); nodeGrid.SetCellValue(nc2, "Val2"); // Second Row ?
How can I add a second row to nodeGrid?
Thanks,
Robert
Hello Robert,
Could you please review the sample attached to this post and see if it meets your requirements.
Please feel free to let me know if I misunderstood you or if you have any other questions.
Hello, I am also having the same problem (adding column sets constructed in code to a freeform style grid). I reviewed your sample code and although it works I need for the column set to appear at the level of Parent1 and the second columnset to appear at the level of Parent 2. How can this be accomplished? Can you post a code snippet? Thanks!
I think I may have answered my own question :
parentNode1.Override.ColumnSet = columnSet1;