Back to Devexpress

DataViewBase.AllowDragDrop Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-b6413d1b.md

latest4.1 KB
Original Source

DataViewBase.AllowDragDrop Property

Gets or sets whether a user can drag and drop grid view records. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public bool AllowDragDrop { get; set; }
vb
Public Property AllowDragDrop As Boolean

Property Value

TypeDescription
Boolean

true, to allow users to drag and drop grid view records; otherwise, false.

|

Remarks

The example below enables drag-and-drop in the TableView:

xaml
<dxg:GridControl>
   <!--...-->        
   <dxg:GridControl.View>
      <dxg:TableView AllowDragDrop="True" />
   </dxg:GridControl.View>
</dxg:GridControl>

Refer to the following help topic for more information: Drag-and-Drop.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowDragDrop property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-implement-drag-and-drop-between-gridcontrols-t566656/CS/MainWindow.xaml#L18

xml
AutoWidth="True"
AllowDragDrop="True"
DragRecordOver="OnDragRecordOver"/>

how-to-customize-drop-marker-t568780/CS/MainWindow.xaml#L24

xml
<dxg:TreeListView KeyFieldName="ID" ParentFieldName="ParentID"
                  AutoExpandAllNodes="True" AllowDragDrop="True">
    <dxg:TreeListView.DropMarkerTemplate>

how-to-implement-drag-and-drop-between-the-gridcontrol-and-other-controls-t566741/CS/MainWindow.xaml#L26

xml
<dxg:TableView AutoWidth="True"
               AllowDragDrop="True"
               DragRecordOver="OnDragRecordOver"

how-to-implement-drag-and-drop-between-the-gridcontrol-and-the-listboxedit-t566433/CS/MainWindow.xaml#L16

xml
<dxg:GridControl.View>
    <dxg:TableView AutoWidth="True" AllowDragDrop="True" DragRecordOver="OnDragRecordOver" />
</dxg:GridControl.View>

wpf-scheduler-drop-data-from-grid-control-to-create-appointments/CS/DragDropFromGridExample/MainWindow.xaml#L55

xml
<dxg:GridControl.View>
    <dxg:TableView AllowDragDrop="True"
                   ShowGroupPanel="False"

See Also

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace