TaskBoard Drag and Drop
The Telerik TaskBoard for Blazor supports two types of drag-and-drop operations:
- Dragging of Cards to a different column or to a different index in the same column.
- Reordering of Columns.
Dragging Cards
The ability to move TaskBoard Cards depends on the CardDraggable boolean parameter. The feature is enabled by default.
When the user drops a Card to another position (index) or column, the TaskBoard fires the OnCardMove event. Use the event to update the Card Index (order) and Status (column).
Using the TaskBoard CardDraggable parameter and OnCardMove event
<TelerikTaskBoard CardDraggable="true"
OnCardMove="@OnTaskBoardCardMove"
TItem="@TaskBoardCard" />
@code {
private void OnTaskBoardCardMove(TaskBoardCardMoveEventArgs<TaskBoardCard> args)
{
//args.IsCancelled = true;
args.Item.Index = args.NewIndex;
args.Item.Status = args.NewStatus;
}
}
See Creating Blazor TaskBoard and TaskBoard Events for full runnable examples.
Reordering Columns
The ability to reorder TaskBoard Columns depends on the ColumnReorderable boolean parameter. The feature is disabled by default.
Using the TaskBoard ColumnReorderable parameter
<TelerikTaskBoard ColumnReorderable="true" />
When the user drops a Column to another position (index), the TaskBoard fires the OnColumnReorder event. If needed, you can cancel the event to undo the column reordering.
Enable or cancel TaskBoard column reordering