Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions components/taskboard/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ Also see the [runnable example](#example) below.

## OnColumnReorder

The TaskBoard `OnColumnReorder` event fires when the user drags a column to another position. The event handler receives a generic [`TaskBoardColumnReorderEventArgs<TColumn>`](slug:Telerik.Blazor.Components.TaskBoardColumnReorderEventArgs-1) argument that exposes information about the dragged column and its old and new order index.

If the Column should not be moved, the event can be cancelled. Otherwise the reorder operation is successfully completed without additional coding.
The TaskBoard `OnColumnReorder` event fires when the user drags a column to another position. The event handler receives a generic [`TaskBoardColumnReorderEventArgs<TColumn>`](slug:Telerik.Blazor.Components.TaskBoardColumnReorderEventArgs-1) argument that exposes information about the dragged column and its old and new order index. The `ColumnData` collection updates automatically, but you may need to update the original data source in order to persist the change for other users and future sessions. If the Column should not be moved, cancel the event.

>caption Using the TaskBoard OnColumnReorder event

Expand All @@ -231,8 +229,13 @@ If the Column should not be moved, the event can be cancelled. Otherwise the reo
@code {
private void OnTaskBoardColumnReorder(TaskBoardColumnReorderEventArgs<TaskBoardColumn> args)
{
// If the user action is not valid
//args.IsCancelled = true;

// OR

// Update the original column data source

Console.WriteLine($"Reordered column {args.Item.Title} from index {args.OldIndex} to index {args.NewIndex}");
}
}
Expand Down
Loading