How to Find the Way for the Disappearance of the Focus Rectangle if the Focus is Lost in the TreeViewAdv

1 Oct 20181 minute to read

This can be done by setting e.Active to false in BeforeNodePaint Event Handler.

// Set the TreeViewAdv's OwnerDrawNodes property to true.
this.treeViewAdv1.OwnerDrawNodes = true;

//Handle the TreeViewAdv's BeforeNodePaint event as shown below :
private void treeViewAdv1_BeforeNodePaint(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvPaintEventArgs e)
    e.Active = false;
'Declare the new node object. 
Private NewNode As Syncfusion.Windows.Forms.Tools.TreeNodeAdv = New Syncfusion.Windows.Forms.Tools.TreeNodeAdv("Inserted Node") 
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) 
Dim NewNode As TreeNodeAdv = New TreeNodeAdv() 

' Use Insert method to add nodes at particular index.
Me.treeViewAdv1.Nodes.Insert(2, NewNode) 
End Sub