Good morning sir Abu,
Is it possible to add menus to each row of data by right-clicking on the mouse?
Reference: https://imgur.com/OCk7gLu
Thank you so much
You can check this context menu demo.
See attached code for help, include JS/CSS files and connected loadComplete event.
Code: https://gist.github.com/gridphp/b5416f203fdac93623b614a5f455731c
Line 26,44,53
It uses following jQuery lib. To customize refer documentation there:
https://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html
Thank you Sir.
But there are no examples of how to have links to other sites on each menu, based on the id of each row of data. Anyone can help?
Code updated at gist to use rowid and cell data.
https://gist.github.com/gridphp/b5416f203fdac93623b614a5f455731c
Line 61,62
More explanation: if you want to open link on clicking certain menu.
If you click on (for e.g.) bravo, it would return its key there in callback.
See: https://i.imgur.com/sXx4F6y.png
Now there you can put if check and do window.open() e.g. see line 64
https://gist.github.com/gridphp/b5416f203fdac93623b614a5f455731c#file-phpgrid-context-menu-php-L64
var m = “Row:”+ row +”, Gender:”+gender+”, Clicked:” + key;
if (key == ‘fold2-key2’)
window.open(‘billing.php?param=’+gender);