DataBinding TreeNode and TreeView

  • Thread starter Rajesh Sadashivan
  • 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
 
S

Sol Fried

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top