Back to Devexpress

TreeListDropTargetMode Enum

blazor-devexpress-dot-blazor-dfa49d65.md

latest3.0 KB
Original Source

TreeListDropTargetMode Enum

Lists values that specify the drop position behavior. Applicable only to drag and drop operations initiated externally.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public enum TreeListDropTargetMode

Members

NameDescriptionImage
BetweenRows

The drop position is defined by TargetItem and DropPosition properties.

|

| | Component |

The drop position is not defined. You need to implement logic in the ItemsDropped event handler to specify where to insert rows.

|

|

The following properties accept/return TreeListDropTargetMode values:

Remarks

In the following snippet, the first TreeList accepts rows from the second TreeList. The DropTargetMode property of the first TreeList is Component.

razor
<DxTreeList @ref="TreeList"
            Data="CompletedTasks"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId"
            ItemsDropped="TreeList_ItemsDropped"
            DropTargetMode="GridDropTargetMode.Component">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" SortOrder="TreeListColumnSortOrder.Ascending" />
        <DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" TextAlignment="TreeListTextAlignment.Left" Width="200px" />
        <DxTreeListDataColumn FieldName="StartDate" Width="100px" />
        <DxTreeListDataColumn FieldName="DueDate" Width="100px" />
    </Columns>
</DxTreeList>

<DxTreeList @ref="TreeList"
            Data="PendingTasks"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId"
            AllowDragRows="true"
            AllowedDropTarget="GridAllowedDropTarget.External">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" SortOrder="TreeListColumnSortOrder.Ascending" />
        <DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" TextAlignment="TreeListTextAlignment.Left" Width="200px" />
        <DxTreeListDataColumn FieldName="StartDate" Width="100px" />
        <DxTreeListDataColumn FieldName="DueDate" Width="100px" />
    </Columns>
</DxTreeList>

See Also

DevExpress.Blazor Namespace