DataBinding TreeNode and TreeView

  • Thread starter Thread starter Rajesh Sadashivan
  • Start date Start date
R

Rajesh Sadashivan

Hi,

I Am trying to bind ForeColor property of a TreeNode with an object in the
node's Tag property

The idea is this .. when a certain value of the object associated with
particular node changes I need to change the color of the node.


Tree is not bound to any datasource.

Thanks,
Ron
 
I am not currently at a VS.NET PC so I can't verify this,
but I believe that this should work.

tv.DataBindings.Add("SelectedNode.ForeColor", tv, (Color)
SelectedNode.Tag);
 
Back
Top