Selection and Hovering

Selection provides an interactive support to highlight the card that you select. Selection can be done through simple Mouse down or Keyboard interaction. To enable selection, set allowSelection as true.

You can see the mouse hovering effect on the corresponding cards using allowHover property. By default selection and hovering is true.

Types of Selection

Two types of selections available in Kanban are,

  1. Single
  2. Multiple

Single Selection

To enable single selection by setting selectionType property as single.

Multiple Selection

Multiple selections is an interactive support to select a group of cards in Kanban by mouse or keyboard interactions. To enable multiple selections by set selectionType property as multiple.

You can select multiple random cards below key press.

Keys Description
Ctrl + mouse left To select multiple random cards.
Shift + mouse left To continuous cards select.

To unselect selected cards, by press “Shift + mouse left” click on selected row.

The following code example describes the above behavior.

  • html
  • <div id='Kanban'></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module KanbanComponent {
        $(function () {
           var data = new ej.DataManager(window.kanbanData).executeLocal(new ej.Query().take(20));
           var sample = new ej.Kanban($("#Kanban"), {
                dataSource: data,
                columns: [
                    { headerText: "Backlog", key: "Open" },
                    { headerText: "In Progress", key: "InProgress" },
                    { headerText: "Done", key: "Close" }
                ],
                keyField: "Status",
                fields: {
                primaryKey: "Id",
                content: "Summary",
                tag: "Tags"
            },
                selectionType:ej.Kanban.SelectionType.Multiple                
            });
        });
    }

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