New to Telerik UI for WPFStart a free 30-day trial

Provides drag and drop capabilities for RadGridView.

Definition

Constructors

Initializes a new instance of the GridViewDragDropBehavior class.

C#
public GridViewDragDropBehavior()

Methods

Returns a value specifying whether the current drag operation can be completed.

C#
public override bool CanDrop(GridViewDragDropState state)
Parameters:stateGridViewDragDropState

DragDropState that provides context for the current operation.

Returns:

bool

True if the drag operation can be completed, otherwise false.

Overrides: DragDropBehavior<GridViewDragDropState>.CanDrop(GridViewDragDropState)

Remarks:

This method is called only in the context of the drop target control.

Copies the items that are dragged in the operation specified by the provided ListBoxDragDropState.

C#
protected override IEnumerable<object> CopyDraggedItems(GridViewDragDropState state)
Parameters:stateGridViewDragDropStateReturns:

IEnumerable<object>

Overrides: DragDropBehavior<GridViewDragDropState>.CopyDraggedItems(GridViewDragDropState)

Completes the drop operation. This method is called only in the context of the drop target control.

C#
public override void Drop(GridViewDragDropState state)
Parameters:stateGridViewDragDropState

DragDropState that provides context for the current operation.

Overrides: DragDropBehavior<GridViewDragDropState>.Drop(GridViewDragDropState)

Remarks:

When the drag source and the drop target are the same control, this method is called before DragCompleted.