Kanbanboard: drag/drop only on the next column

We are currently facing the issue that using the kanbanboard component, a user can drag/drop items over multiple columns. He really should only be able to drop the item one column at a time, is there any elegant way to implement this?


Another issue (only visual, not our main concern) is that when you drag an item to any point on the screen which is not another column, the item gets stuck there. As soon as you click on the board again, it snaps back. Any way to make it snapback automatically after the drop?

Hi,


You can implement this via the following code:

procedure TForm1.TMSFNCKanbanBoard1BeforeDropItem(Sender: TObject; AFromColumn,
  AToColumn: TTMSFNCKanbanBoardColumn; AFromItem,
  AToItem: TTMSFNCKanbanBoardItem; var ACanDrop: Boolean);
begin
  if Assigned(AFromColumn) and Assigned(AToColumn) then
    ACanDrop := (AToColumn.Index = AFromColumn.Index + 1) and (AToColumn.Index >= AFromColumn.Index);
end;

The code checks whether the column to is larger than the column from and then conditionally blocks dropping an item. You can still move to the column, but it will not drop.

We'll investigate the stuck item issue, can you provide additional information on this? We are not able to reproduce this here directly.

Thank you very much for your answer. Works like a charm.


https://imgur.com/a/hlhrkSt
in this album are 3 steps showing what i mean.
1: just an item in a column
2: dragged that item between those 2 columns and this is the result (just drop it anywhere outside the board/columns essentially)
3: clicking on the column makes it visible / snap back again.

hope it helps.

Which framework are you using? Are you using the latest version of the TMS FNC Core and TMS FNC UI Pack?

VCL at the moment. IIRC it happened with the WebCore aswell.


The issue persists after updating.

Hi,


I have been able to reproduce the issue in VCL. Next version will address this issue.