Groups | Blog | Home
all groups > dotnet windows forms > august 2003 >

dotnet windows forms : DataBinding TreeNode and TreeView


Rajesh Sadashivan
8/2/2003 4:37:02 PM
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

Sol Fried
8/5/2003 7:10:32 AM
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);




[quoted text, click to view]
AddThis Social Bookmark Button