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

Disable auto expand Treeview when drag item over

Hello,

I would like to know how can I disable the autoexpand node when dragging an item over a SfTreeView. I have seen STreegrid has a similar configuration:

treeGrid.RowDragDropController.CanAutoExpand = true;

How can I apply this configuration on a SfTreeView?

Thank you


1 Reply 1 reply marked as answer

SJ Sathiyathanam Jeyakumar Syncfusion Team March 8, 2023 04:28 PM UTC

Hi Adria,

In Treeview, you can disable the AutoExpand mode while performing the DragAndDrop operation by setting the CanAutoExpand property to false in the TreeViewDragDropController. Please refer to the below code snippets.

public MainWindow()

{

    InitializeComponent();

    this.sfTreeView1.DragDropController.CanAutoExpand = false;

}

Let us know if you need any further assistance on this.


Regards,

Sathiyathanam


Attachment: Sample_72bffd7.zip

Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon