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 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
  • <div id='Kanban'></div>
  • javascript
  • $(function () {
            var data = ej.DataManager(window.kanbanData).executeLocal(ej.Query().take(30));
            
            $("#Kanban").ejKanban(
                {
                    dataSource: data,
                    columns: [
                        { headerText: "Backlog", key: "Open" },
                        { headerText: "In Progress", key: "InProgress" },    
                        { headerText: "Done", key: "Close" }
                    ],
                    keyField: "Status",
                    fields: {
                        content: "Summary",
                        primaryKey: "Id",
                        priority: "RankId"
                    }
            });
        });

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

    Card Priority

    NOTE

    For Drag and Drop event handling, please refer this API.

    NOTE

    If the priority property is not set in the Kanban fields, the cards are dropped based on the specifying JSON data orders in a particular column.  If not set, drop the card in a particular position based on the previous card priority value and the next card’s priority values will change dynamically.