Pivot table on click event

Hi our company are evaluating using the webix pivot table as our gird library. Do you support onclick event in pivot table? I saw there is a such event in datatable but i cannot find it in pivot table. This is really important to us. I'd appreciate your reply, thanks.

Comments

  • edited March 2017

    Hi,

    Yep, there's an onItemClick event for the pivot Table. You can attach the handler to it either in the widget's configuration:

    view:"pivot",
    id:"mypivot",
    on:{
       onItemClick:function(id){
            webix.message(id);
       }
    }
    

    Or, with the help of a dedicated method:

    $$("mypivot").attachEvent("onItemClick", function(id){
         webix.message(id);
    });
    
  • I tried you example. id.column returns the column name clicked but id.row returns a long integer that I cannot associate to my data. How do I get the row id of the clicked row? Thanks.

  • rowId is the id of the generated row, it may be based on multiple source rows

    Check

    https://docs.webix.com/pivot__configuration.html#accessingrawdata
    and
    https://docs.webix.com/api__ui.pivot_stablerowid_config.html

    First show how to retrieve source data related to the clicked row, second allows to make more meaningful row IDs

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!