We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Deselecting the nodes in tree view

Hi, When I am loading tree view, the first node is getting selected by default. I don''t want this to happen. Any work around will be of great help. Thanks and regards, Maneesh

1 Reply

DT Deepa TS Syncfusion Team March 27, 2006 03:14 PM UTC

Hi Maneesh, Our Syncfusion TreeViewAdv control is closely modelled on the Windows Forms TreeView control. The TreeView has a node selected at all times. To ensure consistency we have incorporated the same behavior in our TreeViewAdv as well. However you could workaround this at application load time as follows : 1. At designtime, set the TreeViewAdv''s InactiveSelectedNodeBackground.Style value to None, such that the InactiveSelectedNodeBackground property value becomes null. 2. When the application loads, the control with the least value for its TabIndex property has focus. Make sure that there is atleast one other control with its TabIndex property less than the TreeViewAdv''s TabIndex property. For example, in the sample attached below, the Button has the least tabIndex value and hence has focus when the application loads. So none of the nodes in TreeView and TreeViewAdv has focus. But if either of them have a lesser TabIndex value then atleast one node will be selected. Please let me know if you have any questions. Best Regards, Deepa AvoidSeletion

Loader.
Live Chat Icon For mobile
Up arrow icon