Class
GridViewDragDropHelper

Helper class that binds the DragDropManager events with a DragDropBehavior.

Definition

Namespace:Telerik.Windows.DragDrop.Behaviors

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

cs-api-definition
public class GridViewDragDropHelper : DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>

Inheritance: objectDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>GridViewDragDropHelper

Inherited Members DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsOfType(IEnumerable, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetInferredItemType(IEnumerable)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetDraggedItems(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsSource(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetContainerFromItem(FrameworkElement, object)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.CreateDragVisualProviderState(Point, FrameworkElement, GridViewDragDropState)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDragSource(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDraggedItem(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropItemsControl(FrameworkElement, object)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropTarget(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemType(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragDropCompleted(FrameworkElement, object, Type, bool)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragOver(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragLeave(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.Drop(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.CreateStateForDrop(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsFromDataObject(object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DataConverterDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragDropBehaviorDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragVisualProvider

Constructors

GridViewDragDropHelper()

Declaration

cs-api-definition
public GridViewDragDropHelper()

Methods

FindDragSource(FrameworkElement)

Finds the control that contains the provided element. In case of a ListBox drag-drop implementation, this method should return a ListBox.

Declaration

cs-api-definition
protected override FrameworkElement FindDragSource(FrameworkElement element)

Parameters

element

FrameworkElement

The element that raised the DragInitialize event.

Returns

FrameworkElement

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDragSource(FrameworkElement)

Remarks

Finds the RadGridView that contains the provided element.

FindDraggedItem(FrameworkElement)

Finds the GridViewRow that contains the provided element.

Declaration

cs-api-definition
protected override FrameworkElement FindDraggedItem(FrameworkElement element)

Parameters

element

FrameworkElement

The element that raised the DragInitialize event.

Returns

FrameworkElement

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDraggedItem(FrameworkElement)

FindDropItemsControl(FrameworkElement, object)

Finds the target control that should accept the dragged items. In case of a ListBox drag-drop implementation, this method should return a ListBox.

Declaration

cs-api-definition
protected override FrameworkElement FindDropItemsControl(FrameworkElement element, object data)

Parameters

element

FrameworkElement

The element that raised the Drop event.

data

object

The DataObject for the current drag operation.

Returns

FrameworkElement

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropItemsControl(FrameworkElement, object)

Remarks

Finds the RadGridView that should accept the dragged items.

FindDropTarget(FrameworkElement)

Finds an item from the target control that contains the provided element. In case of a ListBox drag-drop implementation, this method should return a ListBoxItem.

Declaration

cs-api-definition
protected override FrameworkElement FindDropTarget(FrameworkElement element)

Parameters

element

FrameworkElement

The element that raised the Drop event.

Returns

FrameworkElement

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropTarget(FrameworkElement)

Remarks

Finds a RadGridView from the target control that contains the provided element.

GetContainerFromItem(FrameworkElement, object)

Returns the container for the specified item. When overridden in a derived class allows usage of custom ItemContainerGenerators.

Declaration

cs-api-definition
protected override DependencyObject GetContainerFromItem(FrameworkElement control, object item)

Parameters

control

FrameworkElement

item

object

Returns

DependencyObject

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetContainerFromItem(FrameworkElement, object)

GetDraggedItems(FrameworkElement)

When overridden in a derived class this method returns the items that should be dragged.

Declaration

cs-api-definition
protected override IEnumerable<object> GetDraggedItems(FrameworkElement draggedItem)

Parameters

draggedItem

FrameworkElement

The source control of the drag operation.

Returns

IEnumerable<object>

The items that should be dragged.

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetDraggedItems(FrameworkElement)

Remarks

Returns the SelectedItems list of the RadGridView that contains the dragged row and adds the dragged row to the list if it is not already present there.

GetItemsSource(FrameworkElement)

Returns a list containing the items of the specified control.

Declaration

cs-api-definition
protected override IList GetItemsSource(FrameworkElement element)

Parameters

element

FrameworkElement

Returns

IList

Overrides DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsSource(FrameworkElement)

Remarks

Returns a list containing the items of the specified RadGridView.