attaches a click handler for component parts with the specified CSS class
webix.ui({
view:"list",
template:"#value# <div class='webix_remove_upload'>Del</div>"
onClick:{
"webix_remove_upload":function(ev, id){
this.remove(id);
return false; // blocks the default click behavior
}
}
});
webix.ui({
view:"datatable",
columns:[
{ id:"rank", header:"", css:"rank", width:50},
{ id:"title", header:"Film title", width:200},
{ template:"<input class='delbtn' type='button' value='Delete'>", width:100 }],
on:{
// the default click behavior that is true for any datatable cell
"onItemClick":function(id, e, trg){
webix.message("Click on row: " + id.row+", column: " + id.column)
}
},
// a click behavior for the cell with a button styled with 'delbtn' class
onClick:{
"delbtn":function(e, id, trg){
webix.message("Delete row: "+id);
return false; // here it blocks the default behavior
}
},
data:grid_data
});