BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
is it possible to desable the possibility of changing the order of the elements in 1 column of the kanban ?
In fact, not allow drag and drop between elements of the same column
Regards
var kanbanObj = new ej.kanban.Kanban({ dataSource: data, keyField: 'Status', columns: [ { headerText: 'To Do', keyField: 'Open' }, { headerText: 'In Progress', keyField: 'InProgress' }, { headerText: 'Testing', keyField: 'Testing' }, { headerText: 'Done', keyField: 'Close' }, ], cardSettings: { contentField: 'Summary', headerField: 'Id', tagsField: 'Tags', grabberField: 'Color', footerCssField: 'ClassName', }, dragStop: dragStop, dragStart: dragStart, }); //Render initialized Kanban control kanbanObj.appendTo('#Kanban'); var status; function dragStop(args) { if (this.status == args.data[0].Status) { args.cancel = true; } } function dragStart(args) { this.status = args.data[0].Status; } |
Thanks !
But
I would like not to be able to choose the location in the column but just move an element from one column to another and putting it in the first position in the target column
Regards
Gilles, you can by default move the dropped element to the first positionin the target column by just setting the dropIndex in the dragStop event of the kanban component. Check the below shared code block and sample for reference.
function dragStop(args) { args.dropIndex = 0; ... }
|
Sample: https://stackblitz.com/edit/c5fyle-frjnsx?file=index.html,index.js
Thanks !
For this to be perfect, the shadow that delimits the drop should not be on a box but be on the whole column. Is it possible ?