onItemClick

fires when a data item is clicked

void onItemClick(string|number|object id,Event e,HTMLElement node){ ... };

Parameters

idstring|number|objectthe item id
eEventa native event object
nodeHTMLElementthe target HTML element

Example

$$("mypivot").attachEvent("onItemClick", function(id){
    webix.message(id);
});
 
// or attach the handler to the event in the pivot config
webix.ui({
    view:"pivot",
    id:"mypivot",
    on:{
        onItemClick:function(id){
            webix.message(id);
        }
    }
});

Details

Item id depends on Pivot type.

For Pivot Datatable it is an object with the following properties:

  • row - (string,number) data item id
  • column - (string) column id

For Pivot Chart id is a string or number that points to a data item id.

Back to top
If you have not checked yet, be sure to visit site of our main product Webix web ui framework and page of pivot table web product.