Melon00
06-30-2006, 03:35 PM
I have a TreeView with a bunch of TreeNodes in them, however only some of the TreeNodes have objects attached to them.
I would like to set up data binding between the TreeNode's that contain an object and that objects name property.
example:
I have this setup for the TreeNode:
TreeNode tn = new TreeNode();
tn.Tag = new CDevice("DeviceName");
The "DeviceName" gets set in the TagName property of CDevice. Another part of the program changes the CDevice.TagName property and I would like that to show up in the TreeNode.Text property.
Do I set up a binding for every TreeNode that has an object assiciated with it, in some sort of collection? I can't think of how to do it with one Binding object, so I need help here on how to set this up.
Thanks
I would like to set up data binding between the TreeNode's that contain an object and that objects name property.
example:
I have this setup for the TreeNode:
TreeNode tn = new TreeNode();
tn.Tag = new CDevice("DeviceName");
The "DeviceName" gets set in the TagName property of CDevice. Another part of the program changes the CDevice.TagName property and I would like that to show up in the TreeNode.Text property.
Do I set up a binding for every TreeNode that has an object assiciated with it, in some sort of collection? I can't think of how to do it with one Binding object, so I need help here on how to set this up.
Thanks