HI, I am wondering if there is an example by using UltraTree and UltraGridCan we add a UltraGrid as a child node to a Tree Node.
I am basically looking into some functionality where the headers act like a Tree Node that can be collapsed and the body is a ultraGrid like structure. I cannot use a Grid solution only since the data for the header and the body has no relation.
- SomeText1 CheckBox Text Box ComboEditor CheckBox Text Box ComboEditor CheckBox Text Box ComboEditor CheckBox Text Box ComboEditor
- SomeText2
CheckBox CheckBox ComboEditor TextBox CheckBox CheckBox ComboEditor TextBox CheckBox CheckBox ComboEditor TextBox CheckBox CheckBox ComboEditor TextBox CheckBox CheckBox ComboEditor TextBox
ThanksAJ
Setting the ValueList property acheived my goal to have a dropdown box within the column set!
Many thanks!
Hi,
I'm not sure what you mean by this. You could, in theory, set the DataType of a column to ComboEditor. But that doesn't really seem to make much sense or be particularly useful.
Having a Column whose DataType is ComboEditor will not display the column with a dropdown. It will just mean that the values of the cells in that column are storing ComboEditors.
If you want a dropdown list to show up in a column, you would typically do this on a column with some numeric type and use either the ValueList or the Editor/EditorComponent property on the column to provide a dropdown list.
Does this mean that we can add a ComboEditor as a valid data type in the ColumnSet?
What I want is for my tree to look like is:
-Parent 0
- Child 0
bool string float ComboEditor
Is this possible? I've been having a difficult time implementing it
Thanks for the sample code Mike.
I did get the sequence of steps that need to be done to form the tree.I was missing a step in between. The way we were adding the columnSets to the parent node was different.
Thank You once again. Aditya
Here's a little sample code I whipped up to demonstrate how to set up a tree like this:
this.ultraTree1.ViewStyle = ViewStyle.FreeForm; UltraTreeNode parentNode1 = this.ultraTree1.Nodes.Add("Parent 1"); UltraTreeNode parentNode2 = this.ultraTree1.Nodes.Add("Parent 2"); UltraTreeColumnSet columnSet1 = new UltraTreeColumnSet(); columnSet1.Columns.Add("A"); columnSet1.Columns.Add("B"); columnSet1.Columns.Add("C"); parentNode1.Nodes.Override.ColumnSet = columnSet1; UltraTreeColumnSet columnSet2 = new UltraTreeColumnSet(); columnSet2.Columns.Add("1"); columnSet2.Columns.Add("2"); parentNode2.Nodes.Override.ColumnSet = columnSet2; UltraTreeNode childNode = parentNode1.Nodes.Add(); childNode.Cells["A"].Value = "A1"; childNode.Cells["B"].Value = "B1"; childNode.Cells["C"].Value = "C1"; childNode = parentNode1.Nodes.Add(); childNode.Cells["A"].Value = "A2"; childNode.Cells["B"].Value = "B2"; childNode.Cells["C"].Value = "C2"; childNode = parentNode1.Nodes.Add(); childNode.Cells["A"].Value = "A3"; childNode.Cells["B"].Value = "B3"; childNode.Cells["C"].Value = "C3"; childNode = parentNode2.Nodes.Add(); childNode.Cells["1"].Value = "11"; childNode.Cells["2"].Value = "21"; childNode = parentNode2.Nodes.Add(); childNode.Cells["1"].Value = "12"; childNode.Cells["2"].Value = "22";