Handling Events with Kanban Board

Attaching Event Handlers

You can add any user-defined handler to any of the available events. To do this, you can use the attachEvent method with the following parameters:

  • evName - the name of the event;
  • evHandler - your own event handler.
$$("myBoard").attachEvent(evName, evHandler);

Several handlers can be attached to one and the same event, and all of them will be executed. The names of the events are case-insensitive.

Event handlers can also be attached with the on property:

webix.ui({
    view:"kanban",
    on:{
        onListIconClick: function(iconId, itemId){
            webix.message("Icon click in '"+this.getItem(itemId).text+"' item");
        }
    },
    cols:[
        { header:"Backlog", body:{ view:"kanbanlist", status:"new", type: "icons" }},
        { header:"In Progress", body:{ view:"kanbanlist", status:"work", type: "icons" }}
    ],
    url:"./data/tasks"
});

Related sample:  Icon Click

Detaching Event Handlers

There is a simple way of removing an event-handler:

$$("myBoard").detachEvent(id); // the unique ID of the event handler

List of Supported Events

You can find the full list of supported events in the Kanban Board API Reference.

Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript framework and page of kanban board tool product.