Menu button to edit grid row

I have a layout cell containing a menu and a grid.



I can delete a grid row by pressing a button but how can I get a menu button to delete a row?


If you meant dhtmlxmenu as menu, you can use menu API to add a new button. Please, check the sample dhtmlxMenu/samples/01_init/03_init_from_script.html in menu package.


It’s possible to set onClick event handler and execute the necessary action on button click:


menu.attachEvent(“onClick”,function(menuId){


if(menuId==“delete”) mygrid.deleteSelectedRows();


});