Adding and Deleting Items

Adding and deleting can be implemented in the form of events that fire on user actions. You can set handlers on button clicks that will call the corresponding methods: add or remove.

Adding new items

Basic syntax will look as follows:

// get random id
var itemId = webix.uid();
// add an item to Kanban board
    id: itemId,
    text: "Kanban docs",
    status: "new",

An added item should contain the 'status' property in order to be added in one of Kanban lists.

Related sample:  Adding New Items

You can add an empty item and then open the edit form for it, giving a user the possibility to set necessary values.

Deleting items

To remove an item you should apply the remove() method to it:

// delete an item

An example of deleting a selected item is given below:

var itemId = $$("myBoard").getSelectedId();
   webix.message("No item is selected!");

All items can be removed from Kanban board via the clearAll method:


More information about adding and removing items you can find here.

Related sample:  Adding New Items

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