How to disable row drag popup based on the drop position in WPF TreeGrid(SfTreeGrid)?
WPF TreeGrid (SfTreeGrid), will display a popup while dragging the rows in which the drop status and the dragging rows count will be displayed. You can disable this popup based on some condition by using TreeGrid.RowDragDropController.DragOver event.
private void OnRowDragDropController_DragOver(object sender, TreeGridRowDragOverEventArgs e)
{
if (e.DropPosition == Syncfusion.UI.Xaml.TreeGrid.DropPosition.DropAbove)
{
e.ShowDragUI = true;
}
else
{
e.ShowDragUI = false;
var popup = (Popup)this.treeGrid.RowDragDropController.GetType().GetField("dragpopup", System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance).GetValue(this.treeGrid.RowDragDropController);
popup.IsOpen = false;
}
}
Take a moment to peruse the documentation, where you can find about row drag and drop, with code examples.
Please refer this link to know about the essential features of Syncfusion WPF DataGrid.