ClassGridViewDragDropHelper
Helper class that binds the DragDropManager events with a DragDropBehavior.
Definition
Namespace:Telerik.Windows.DragDrop.Behaviors
Assembly:Telerik.Windows.Controls.GridView.dll
Syntax:
public class GridViewDragDropHelper : DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>
Inheritance: objectDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>GridViewDragDropHelper
Inherited Members
Constructors
GridViewDragDropHelper()
Declaration
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
protected override FrameworkElement FindDragSource(FrameworkElement element)
Parameters
element
FrameworkElement
The element that raised the DragInitialize event.
Returns
FrameworkElement
Overrides
Remarks
Finds the RadGridView that contains the provided element.
FindDraggedItem(FrameworkElement)
Finds the GridViewRow that contains the provided element.
Declaration
protected override FrameworkElement FindDraggedItem(FrameworkElement element)
Parameters
element
FrameworkElement
The element that raised the DragInitialize event.
Returns
FrameworkElement
Overrides
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
protected override FrameworkElement FindDropItemsControl(FrameworkElement element, object data)
Parameters
element
FrameworkElement
The element that raised the Drop event.
data
The DataObject for the current drag operation.
Returns
FrameworkElement
Overrides
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
protected override FrameworkElement FindDropTarget(FrameworkElement element)
Parameters
element
FrameworkElement
The element that raised the Drop event.
Returns
FrameworkElement
Overrides
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
protected override DependencyObject GetContainerFromItem(FrameworkElement control, object item)
Parameters
control
FrameworkElement
item
Returns
DependencyObject
Overrides
GetDraggedItems(FrameworkElement)
When overridden in a derived class this method returns the items that should be dragged.
Declaration
protected override IEnumerable<object> GetDraggedItems(FrameworkElement draggedItem)
Parameters
draggedItem
FrameworkElement
The source control of the drag operation.
Returns
The items that should be dragged.
Overrides
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
protected override IList GetItemsSource(FrameworkElement element)
Parameters
element
FrameworkElement
Returns
Overrides
Remarks
Returns a list containing the items of the specified RadGridView.