Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dirk Holstein on Sep 18, 2008 02:14
open dhtmlx forum
Grid Context Menu place in DOM-Structure

Hello,

I use the dhtmlxGrid v1.6 professional and use the context-menu functionality.

I have found out that the context-menu-table is placed somewhere in the DOM-Structure. In my example it is right bevore the closing body-tag.
Is there any possiblity to place the context-menu-table at a defined place in the DOME?
For example I define a div with the ID "contextMenu" and then I can place the context-menu-table in this div?

My problem is, that in my project all content is provided via AJAX. The content is replaced in a div with the ID "content". So the context-menu is placed outside this div and will never be deleted or replaced. So when I call 20 pages with the context-menu I have 20 context-menu-tables in my HTML-Code. This will cause the browser go slowly.

Can you provide any solution?

Thank you very much.

Dirk
Answer posted by Support on Sep 19, 2008 02:56
Menu supports clearAll method, which nullifies used objects, so it partially solve memory leak problem.

Fpr context menu:

cMenu = new...

... usage ...

/*reloding*/

cMenu.menu.clearAll();

cMenu.menu.loadXML(url);