Prioritization of cards

28 May 20192 minutes to read

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.