WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridRowDragDropController

    Show / Hide Table of Contents

    Class GridRowDragDropController

    Represents a class that handles row drag-and-drop operations in SfDataGrid.

    Inheritance
    System.Object
    GridRowDragDropController
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.UI.Xaml.Grid
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public class GridRowDragDropController : IDisposable
    Remarks

    It provides the set of public properties and virtual methods to handle the row drag-and-drop operations in SfDataGrid.

    Constructors

    GridRowDragDropController()

    Initializes a new instance of GridRowDragDropController class.

    Declaration
    public GridRowDragDropController()

    Properties

    DataGrid

    Gets the reference to the SfDataGrid control.

    Declaration
    protected SfDataGrid DataGrid { get; set; }
    Property Value
    Type Description
    SfDataGrid

    Methods

    CloseDraggablePopUp()

    Closes the Drag popup indicator.

    Declaration
    protected virtual void CloseDraggablePopUp()

    CloseDragIndicators()

    Closes the Drag arrow indication and clears all the row's VSM applied.

    Declaration
    protected virtual void CloseDragIndicators()

    Dispose()

    To Dispose the items

    Declaration
    public void Dispose()

    GetDropPosition(DragEventArgs, RowColumnIndex, ObservableCollection<Object>)

    Gets the dropping position of a dragging row.

    Declaration
    protected virtual DropPosition GetDropPosition(DragEventArgs args, RowColumnIndex rowColumnIndex, ObservableCollection<object> draggingRecords)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specified index on which the mouse is hovered.

    System.Collections.ObjectModel.ObservableCollection<System.Object> draggingRecords

    Specifies the dragging records.

    Returns
    Type Description
    DropPosition

    Returns appropriate drop position DropPosition if row can drop at the specified index otherwise none.

    OnAttach(SfDataGrid)

    Wiring the DataGrid events in OnAttach method.

    Declaration
    protected void OnAttach(SfDataGrid grid)
    Parameters
    Type Name Description
    SfDataGrid grid

    Specifies the SfDataGrid

    ProcessOnDragOver(DragEventArgs, RowColumnIndex)

    Occurs when the input system reports an underlying dragover event with this element as the potential drop target.

    Declaration
    protected virtual void ProcessOnDragOver(DragEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ProcessOnDragStarting(MouseEventArgs, RowColumnIndex)

    Occurs when a drag operation is initiated.

    Declaration
    protected virtual void ProcessOnDragStarting(MouseEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs args

    An Windows.UI.Xaml.DragStartingEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ProcessOnDrop(DragEventArgs, RowColumnIndex)

    Occurs when the input system reports an underlying drop event with this element as the drop target.

    Declaration
    protected virtual void ProcessOnDrop(DragEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ShowDragDropPopup(DropPosition, ObservableCollection<Object>, DragEventArgs)

    Creating a Custom Popup.

    Declaration
    protected virtual void ShowDragDropPopup(DropPosition dropPosition, ObservableCollection<object> draggingRecords, DragEventArgs args)
    Parameters
    Type Name Description
    DropPosition dropPosition

    Indicates the drop position, based on that the indicators will shown.

    System.Collections.ObjectModel.ObservableCollection<System.Object> draggingRecords

    Indicates the dragging records

    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    ShowDragIndicators(DropPosition, RowColumnIndex, DragEventArgs)

    Sets drag indicators in appropriate position.

    Declaration
    protected virtual void ShowDragIndicators(DropPosition dropPosition, RowColumnIndex rowColumnIndex, DragEventArgs args)
    Parameters
    Type Name Description
    DropPosition dropPosition

    Indicates the drop position,based on that the indicators will shown.

    RowColumnIndex rowColumnIndex

    Specifies the rowColumn index based on mouse hover.

    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    UnWireRowDragDropControllerEvents()

    UnWire the events of the elements

    Declaration
    protected void UnWireRowDragDropControllerEvents()

    Events

    DragLeave

    This event occurs when leave a drag-and-drop operation.

    Declaration
    public event EventHandler<GridRowDragLeaveEventArgs> DragLeave
    Event Type
    Type Description
    System.EventHandler<GridRowDragLeaveEventArgs>

    DragOver

    This event occurs continuously while record is dragged within the target SfDataGrid.

    Declaration
    public event EventHandler<GridRowDragOverEventArgs> DragOver
    Event Type
    Type Description
    System.EventHandler<GridRowDragOverEventArgs>

    DragStart

    This event occurs when a drag-and-drop operation is starting.

    Declaration
    public event EventHandler<GridRowDragStartEventArgs> DragStart
    Event Type
    Type Description
    System.EventHandler<GridRowDragStartEventArgs>

    Drop

    This event occurs when a record is dropping within the target SfDataGrid.

    Declaration
    public event EventHandler<GridRowDropEventArgs> Drop
    Event Type
    Type Description
    System.EventHandler<GridRowDropEventArgs>

    Dropped

    This event occurs when a record is dropped within the target SfDataGrid.

    Declaration
    public event EventHandler<GridRowDroppedEventArgs> Dropped
    Event Type
    Type Description
    System.EventHandler<GridRowDroppedEventArgs>

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved