Hi Telerik
I'm trying to create a standout highlight in a treeview to indicate which document in a raddock has been selected. I have created a Custom document with a DocumentNode property which points to the node in the tree which relates to the document. I'm using the Active document changed event and a TreeViewElement.Update to attempt this. THe code works for the addition of a single document but gets stuck on the next added document and won't reformat the appropriate node when I change from one document to the other by clicking on the document window tab.
The key code snippets are below:
In Active Document changed
In Node Formatting event
As usual, all help gratefully received
Regards
Ian
I'm trying to create a standout highlight in a treeview to indicate which document in a raddock has been selected. I have created a Custom document with a DocumentNode property which points to the node in the tree which relates to the document. I'm using the Active document changed event and a TreeViewElement.Update to attempt this. THe code works for the addition of a single document but gets stuck on the next added document and won't reformat the appropriate node when I change from one document to the other by clicking on the document window tab.
The key code snippets are below:
In Active Document changed
tvMPWorkspace.TreeViewElement.Update(RadTreeViewElement.UpdateActions.StateChanged);
In Node Formatting event
if
(rDockModelPackage.DocumentManager.ActiveDocument !=
null
&& ((RadCustomDocumentWindow)rDockModelPackage.DocumentManager.ActiveDocument).DocumentNode == e.Node)
{
e.NodeElement.BackColor = Color.PaleGoldenrod;
}
else
{
e.NodeElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
}
As usual, all help gratefully received
Regards
Ian