Drag and Drop

By default allowDragAndDrop is true.Cards can be transited from one column to another column, by dragging and dropping. And it has drop position indicator which enables easier positioning of cards

NOTE

It is not possible transit cards to other swim lanes through Drag and Drop.

Prioritization of cards

Prioritizing cards is easy with drag-and-drop re-ordering that helps you to categorize most important work at the top.Cards can be categorized with priority by mapping specific database field into fields.priority property.

RankId defined in the dataSource which is consist priority of cards. The RankId will be changed while card ordering changes through Drag and Drop and Editing.

The following code example describes the above behavior.

  • html
  • <ej-kanban [dataSource]="kanbanData" keyField="Status" fields.content="Summary" fields.primaryKey="Id" fields.priority="RankId">
        <e-kanban-columns>
            <e-kanban-column key="Open" headertext="Backlog"></e-kanban-column>
            <e-kanban-column key="InProgress" headertext="In Progress"></e-kanban-column>
            <e-kanban-column key="Close" headertext="Done"></e-kanban-column>
        </e-kanban-columns>
    </ej-kanban>
  • html
  • import { Component } from '@angular/core';
    import { NorthwindService } from '../../services/northwind.service';
    
    @Component({
      selector: 'ej-app',
      templateUrl: 'app/components/kanban/default.component.html',
      providers: [NorthwindService]
    })
    export class DefaultComponent {
      public kanbanData: any;
        constructor(private northwindService: NorthwindService) {
            this.kanbanData = northwindService.getTasks();
        }
    }

    The following output is displayed as a result of the above code example.