contextMenu callback get another function

Tags: #<Tag:0x00007efc6100c008>

I want to create a context menu when a cell is clicked and then when I click an option in this menu, it will go to another function with cell’s value and cell’s index as parameter but I don’t know how. Can’t you help me?

Hi @umit

I am not sure if I understand the process. Could you please share an example or a drawing?

contextMenu: {

  items: {

    "option": {

      name: 'examp',

      callback: function(key, options) {

var row = this.getDataAtRow(this.getSelectedLast()[0]);
this.example(row ) // this not working

      },

    },

           

  }

},

example(id){
console.log(id);
}

I think that it is because of the function declaration. Would that http://jsfiddle.net/679jveLk/ option work for you?

working thank you.

Great. Please feel free to open a new ticket or write us at support@handsontable.com with any future questions.