Hi,
I'd like to copy a node from TreeView to another Treeview but I want to keep each Cells of the nodes databound from DataTable.
The Clone methode doesn't clone cells.
From a node with cells, the result is a node with only a single value ...
Code :
trvProjects.DataSource = dsBudgetMap; trvProjects.DataMember = "BUDGET";
foreach (UltraTreeNode tnTas in tnPro.Nodes) trvTaskLate.Nodes.Add(tnTas.Clone());
I'm not sure exactly what you are trying to do. But it makes sense that the underlying data from the data source is not cloned. It's probably not cloneable.
Is the second tree bound? You might want to simply bind the second tree to a data source with the same structure as the first tree, and then you can add nodes to the second tree by copying the data and adding a new row to the data source.
Otherwise, your second tree will need to have a ColumnSet (or sets) defined that match the structure of the first tree's columns and then you will have to loop through the cells and copy the value of each cell.