Selection and Hovering

29 May 20191 minute to read

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
  • <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%><%@ taglib prefix="ej" uri="/WEB-INF/EJ.tld" %><%@ page import="com.syncfusion.*" %><%@ page session="false" import="java.util.ArrayList" %><%@ page session="false" import="java.util.Iterator" %><%@ page import="datasource.GetJsonData" %>
        <body>
    	<div class="cols-sample-area"><%
        GetJsonData obj=new GetJsonData();
        Object data = obj.GetKanbanJson();
        request.setAttribute("KanbanDataSource",data);
        %>
    		<ej:kanban id="Kanban" keyField="Status" selectionType="multiple" dataSource="${KanbanDataSource}">
    			<ej:kanban-fields content="Summary" tag="Tags" primaryKey="Id"></ej:kanban-fields>
    			<ej:kanban-columns>
    				<ej:kanban-column headerText="Backlog" key="Open"></ej:kanban-column>
    				<ej:kanban-column headerText="In Progress" key="InProgress"></ej:kanban-column>
    				<ej:kanban-column headerText="Done" key="Close"></ej:kanban-column>
    			</ej:kanban-columns>
    		</ej:kanban>
    	</div>
        </body>
        </html>

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

    Selection and hovering in JSP kanban control