Categories | Question details Back To List | ||
Layout Dettach? Is There a dettachObject type of functionality for the layout object? After attaching ab object: dhxLayout.cells("c").attachObject("panel_add_edit_designgrid_sql"); then replacing the content later: dhxLayout.cells("c").attachHTMLString("<div align='center' style='color:#969696'><b><br/><br/><br/>No Field Selected</b></div>"); When trying to reattach: dhxLayout.cells("c").attachObject("panel_add_edit_designgrid_sql"); The following error is caught: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://cms.local/_components/dhtmlxLayout/codebase/dhtmlxcontainer.js :: anonymous :: line 13" data: no] Answer posted by Alex (support) on Jan 19, 2010 08:18 When you call dhxLayout.cells("c").attachHTMLString("<div align='center' style='color:#969696'><b><br/><br/><br/>No Field Selected</b></div>"); the previous cell content is removed, so panel_add_edit_designgrid_sql container doesn't exist any more. You can replace panel_add_edit_designgrid_sql to the body for example, hide it and attached again when it's necessary: document.body.appendChild(document.getElementById(" panel_add_edit_designgrid_sql")); document.getElementById(" panel_add_edit_designgrid_sql").style.display = "none"; dhxLayout.cells("c").attachHTMLString("<div align='center' style='color:#969696'><b><br/><br/><br/>No Field Selected</b></div>"); |