How to use contextmenu in datatable's action column ?

How to use contextmenu in datatable's action column ?

Comments

  • edited August 10

    Hello @Naufil ,
    You can link a context menu with datatable using the master property and attach onItemClick event:

    webix.ui({
        view:"contextmenu", id:"cm",
        data: ["Add", "Rename", "Delete"],
        master:$$("grid")   // component object
        on:{
        onItemClick:function(id){
          //... some code here ... 
          var context = this.getContext();
          var list = context.obj;
          var listId = context.id;
          webix.message("Datatable item: <i>"+list.getItem(listId).title+"</i> <br/>Context menu item: <i>"+this.getItem(id).value+"</i>");
        }
      }
    });
    

    Please check the next snippet:
    https://snippet.webix.com/9vsx9t6q
    You can get more information on how to use it here.

  • great.. thank you @annazankevich.

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!