Dynamic Context Menu - No longer works after upgrade
Asked by Anonymous 15 years ago.
Hi,
In all versions of Daypilot prior to 6.1 I created context menus from a dynamic dataset. I recently upgraded to 6.1 and the menus no longer work. When I right click on an event,the context menu no longer shows and I get a javascript error "No menu items defined."
If I hard code a menu on the page it works fine but not when the items are dynamic.
I have looked into this a bit more and in all previous versions I have created the context menu in an page initialise function, and this worked. Now it seems to work only if I create the menus in Page_Load, which I don't really want to do.
Can you tell me if there is a way around this please?
Thanks
Comment posted by Dan Letecky 15 years ago.
And when do you need to create the menu?
The menu code has changed a lot in 6.1 but I can't imagine a situation when the previous code would work but the new one wouldn't.
Comment posted by Dan Letecky 15 years ago.
I can see the problem now. The context menu initialization code was written to the HTML in OnLoad method. I have moved the config part to Render and it should work now.
You can get the latest sandbox build (6.2.2151) to test the change.