redefines default click behavior for component items.
webix.protoUI({
name:"mylist",
defaults:{
template:"#value# <div class='webix_remove_upload'>Del</div>"
},
on_click:{
"webix_remove_upload":function(ev, id){
this.remove(id);
}
}
}, webix.ui.list);
grid = webix.ui({
view:"datatable",
columns:[
{ id:"rank", header:"", css:"rank", width:50},
{ id:"title", header:"Film title",width:200},
{ id:"", template:"<input class='delbtn' type='button' value='Delete'>",
css:"padding_less",width:100 }],
on:{
"onItemClick":function(id, e, trg){
webix.message("Click on row: " + id.row+", column: " + id.column);}
} //default click behavior that is true for any datatable cell
});
// click behavior for the cell with a button styled with 'delbtn' class
grid.on_click.delbtn=function(e, id, trg){
webix.message("Delete row: "+id);
return false; //here it blocks default behavior
};
Related sample: Datatable: Custom Handler