GridViewDragInfo

References
public class GridViewDragInfo
Extra drag information when dragging to a TreeGridView.
Remarks: Use this information to determine where the user is dragging to, and also to change where the drag indicator will be shown by modifying the Item and ChildIndex properties.

Constructors

GridViewDragInfo

#
public GridViewDragInfo(GridView control, object item, int index, GridDragPosition position)
Initializes a new instance of the GridDragInfo class.
control (GridView)The parent widget that this info belongs to
item (object)Item user is dragging to.
index (int)Index where the item should be inserted, or -1 if dragging ontop of item.
position (GridDragPosition)The position of the cursor relative to the item under the cursor.

Properties

Control

#
public GridView Control { get; }
Gets the parent tree control this info is for.

Index

#
public int Index { get; set; }
Gets or sets the insertion index where the user is dragging to as a child of Item, or -1 if dragging ontop of the Item.
Remarks: This is useful if the user is dragging inbetween existing items, or the beginning or end of a child list. Only some platforms may support this property, otherwise it will always return -1.
The insertion index where the user is dragging to, otherwise -1.

InsertIndex

#
public int InsertIndex { get; }
Gets the insertion index of drop operation, or -1 if not an insert (dragging over)

IsChanged

#
public bool IsChanged { get; }
Gets a value indicating whether this GridDragInfo is changed.
Remarks: This will return true if the Index or Item have been set. This is useful for platform implementations to determine if the drop target has been modified.
true if is changed; otherwise, false.

Item

#
public object Item { get; }
Gets or sets the item the user is dragging to.

Position

#
public GridDragPosition Position { get; set; }
Gets the position of the ChildIndex relative to the item under the mouse cursor.
Remarks: When dragging between items, this will tell you if the ChildIndex specified is after or before the item under the mouse cursor. This allows you to adjust the Item and ChildIndex.
The position.

Methods

RestrictToInsert

#
public void RestrictToInsert()
Helper to restrict the drop to insert items only without allowing draging over existing items.

RestrictToOver

#
public void RestrictToOver()
Helper to restrict to drop on top an existing item without allowing any insertion.