Categories | Question details Back To List | ||
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 <input type="button" name="delete" value="Delete row" onclick="mygrid.deleteSelectedRows()"> but how can I get a menu button to delete a row? Answer posted by Alex (support) on Nov 18, 2009 02:18 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(); }); |