attaches a click behavior for component items with the specified CSS class.
grid = new 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
onClick:{
"delbtn":function(e, id, trg){
webix.message("Delete row: "+id);
return false; //here it blocks default behavior
}
});
Back to top