T
Tim Mackey
this is an unusual problem and there doesn't seem to be anything about it
online.
i have several winforms that create different treeviews based on the same
data, they may be opened by the user at the same time, and i want to achieve
consistency between all views, without resorting to regenerating the entire
tree from scratch every time a value changes in a node. the data for the
treeviews is made up of two types of objects, both derived from TreeNode.
it is no problem to add the nodes to one treeview, but if i add the same
nodes to another treeview they disappear out of the original one. before i
set the data objects to inherit from TreeNode, i used to have them stored in
the Tag of regular TreeNodes but the code is quite cumbersome, and there is
no direct databinding between the objects and the treeview. i don't want to
clone the nodes because then i would also lose the direct databinding with
the data objects when they change.
any ideas would be very appreciated
tim
online.
i have several winforms that create different treeviews based on the same
data, they may be opened by the user at the same time, and i want to achieve
consistency between all views, without resorting to regenerating the entire
tree from scratch every time a value changes in a node. the data for the
treeviews is made up of two types of objects, both derived from TreeNode.
it is no problem to add the nodes to one treeview, but if i add the same
nodes to another treeview they disappear out of the original one. before i
set the data objects to inherit from TreeNode, i used to have them stored in
the Tag of regular TreeNodes but the code is quite cumbersome, and there is
no direct databinding between the objects and the treeview. i don't want to
clone the nodes because then i would also lose the direct databinding with
the data objects when they change.
any ideas would be very appreciated
tim