K
kurotsuke
I have some data organized in a tree structure saved in an XML file
and I want to display it in a TreeView control (the XtraTreeview of
DevExpress).
Each data item I would like to store in a class so that I can attach
to it some logic (for example to each data is associated an Execute
method).
I wonder what is the best solution: subclass the TreeView Node and
extend it adding all the logic I need or create a completely detached
tree structure that contains my data and then link it somehow to the
TreeNode component (probably this way is nicer since I don't match and
mix business logic with the interface).
One thing to notice is that the data will change (the user can modify
it) so I'll have to take care of updating the data structure.
Thanks a lot for any suggestion.
Andrea
and I want to display it in a TreeView control (the XtraTreeview of
DevExpress).
Each data item I would like to store in a class so that I can attach
to it some logic (for example to each data is associated an Execute
method).
I wonder what is the best solution: subclass the TreeView Node and
extend it adding all the logic I need or create a completely detached
tree structure that contains my data and then link it somehow to the
TreeNode component (probably this way is nicer since I don't match and
mix business logic with the interface).
One thing to notice is that the data will change (the user can modify
it) so I'll have to take care of updating the data structure.
Thanks a lot for any suggestion.
Andrea