Called when user clicks on a context menu item.
menuClick(recid, index, event)

recid | string, id of the clicked record
index | integer, index of the menu item in the menu array
event | object, optional, DOM Event Object

Returns undefined.

#### Description

The first argument recid is the id of the record that was clicked. The third argument event is DOM event object. This method emits .onMenuClick event.
If you have grid defined in the following way: $('#grid').w2grid({ name: 'grid2', columns: [ { field: 'recid', caption: 'ID', size: '50px' }, { field: 'lname', caption: 'Last Name', size: '30%' }, { field: 'fname', caption: 'First Name', size: '30%' }, { field: 'email', caption: 'Email', size: '40%' }, { field: 'sdate', caption: 'Start Date', size: '120px' }, { field: 'sdate', caption: 'End Date', size: '120px' } ], menu: [ { id: 1, text: 'Select Item', icon: 'fa fa-star' }, { id: 2, text: 'View Item', icon: 'fa fa-camera' }, { id: 4, text: 'Delete Item', icon: 'fa fa-minus' } ], records: [ { recid: 1, fname: 'John', lname: 'doe', email: 'vitali@gmail.com', sdate: '1/3/2012' }, { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '2/4/2012' }, { recid: 3, fname: 'Jin', lname: 'Franson', email: '--', sdate: '4/23/2012' }, { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'jdoe@gmail.com', sdate: '5/3/2012' }, { recid: 5, fname: 'Kelly', lname: 'Silver', email: 'jdoe@gmail.com', sdate: '4/3/2012' }, { recid: 6, fname: 'Francis', lname: 'Gatos', email: 'vitali@gmail.com', sdate: '2/5/2012' } ], onMenuClick: function(event) { console.log(event); } }); You can do: w2ui['grid2'].menuClick(4, 1);