TileViewOptionsDragDrop.AllowDrag Property
Gets or sets whether the built-in tile drag-and-drop functionality is enabled.
Namespace: DevExpress.XtraGrid.Views.Tile
Assembly: DevExpress.XtraGrid.v24.1.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
Declaration
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowDrag { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | false | true if the built-in tile drag-and-drop functionality is enabled; otherwise, false. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to AllowDrag |
---|---|
TileView |
|
Remarks
Use the AllowDrag property to enable the built-in drag-and-drop functionality. Built-in tile drag-and-drop operations are reflected at the data source level. When a tile is dropped at a certain position, the Tile View moves the tile’s underlying data record to a corresponding position in the data source.
Tiles can be combined into groups by specifying the group column (TileViewColumns.GroupColumn). If a tile is moved from one group to another group, the underlying record’s group field (GroupColumn.FieldName) is changed accordingly.
When you manually create Kanban Groups (see TileView.OptionsKanban.Groups), you can use the following properties to disable and customize drag-and-drop operations for individual groups.
- KanbanGroup.AllowItemDrag - Gets or sets whether to disable tile drag-and-drop operations within and from the current group.
- KanbanGroup.DropTargetGroups - The collection of groups that can accept tiles from the current group during drag-and-drop operations.
Handle the following events to manage drag-and-drop operations and implement your own algorithm for moving and modifying underlying data records.
- TileView.BeforeItemDrag - Fires when a tile drag operation is about to be started. Allows you to provide a drag image, or to cancel the operation. This event does not fire when you enable drag-and-drop using Drag And Drop Behavior.
- TileView.ItemDrag - Fires repeatedly when a user drags a tile. Allows you to prevent a tile from being dropped at a specific position. This event does not fire when you enable drag-and-drop using Drag And Drop Behavior.
- TileView.BeforeItemDrop - Fires when a tile drop operation is initiated. This event does not fire when you enable drag-and-drop using Drag And Drop Behavior.
- TileView.ItemDrop - Fires after a tile drop operation has been completed. This event does not fire when you enable drag-and-drop using Drag And Drop Behavior.