I instantiate the menu and all works fine – i.e. the context menu opens and the itemclick event fires. If I reload my page (via AJAX) and reinstantiate the widget and menu the grid reloads fine; the menu pops up fine; however, the itemclick event not longer fires. Again, only on an AJAX reload of the page. I made sure the widget library is only loaded once – i.e. via header.html that loads all resources.
I’ve even tried to destroy and recreate menu and unbind/rebind item click.
$(‘#mymenu’).jqxMenu(‘destroy’);
let contextMenu = $(‘#mymenu’).jqxMenu({ width: 230, autoOpenPopup: false, mode: ‘popup’});
$(‘#myGrid’).on(‘contextmenu’, () => {return false;});
$(‘#mymenu’).unbind(‘itemclick’).on(‘itemClick’, (event) =>
{….}
Going crazy trying to figure out why itemclick will not get fired on reload. Any ideas, please?
You could try to update grid’s source data after page reload via AJAX, not initialize the whole widget. Also if you share your code we would be in greater help.