Skip to content

on_context

a property used to define custom context-click (right click) handlers for elements in a datagrid

let on_context: EventHash
var dgrid = webix.grid({
data:[
{ text:"<div class='myActive'>click here</div>" }
]
});
dgrid.on_context.myActive = function(id, event, target){
console.log("Active area was right-clicked");
};
//or
dgrid.on_context["myActive"] = function(id, event, target){
console.log("Active area was right-clicked");
};

It’s an object property that contains already available handlers.
All the handlers (existing and newly-added) are specified by the related class name.