Problem with attachObject() and attachGrid()

I have a layout of type"2E". in the lower cell I hav attached another layout of type"1E". With this layout cell i want to attach the following:
A toolbar
A grid
A div object for displaying some message.

attachToolBar() and attachGrid() work fine.
but after attaching the gird i try to attach the div object. It does not allow me to do so. It removes thr grid and instead shows the Div only.

Is there any problem with this?

There isn’t 1E pattern in layout (possibly you meant 1C or 2E).
attachGrid method doesn’t allow to use attachObject for the same cell.
Therefore you can create 3E layout instead of embeded layouts:

  1. in the “b” cell of tis layout you can attach toolbar and grid:

layout.cells(“b”).attachToolbar();
layout.cells(“b”).attachGrid();

  1. and div should be placed in the “c” cell:

layout.cells(“c”).attachObject(…);

You can hide header of the “c” cell if you want: layout.cells(“c”).hideHeader()

i have the problem too.

when i use attachObject() to add a div in cell,IE tell me “Object does not support property or method”.


<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">

    <script src="Javascript/dhtmlxLayout/codebase/dhtmlxcommon.js" type="text/javascript"></script>

    <script src="Javascript/dhtmlxLayout/codebase/dhtmlxcontainer.js" type="text/javascript"></script>

    <link href="Javascript/dhtmlxLayout/codebase/skins/dhtmlxlayout_dhx_skyblue.css"
        rel="stylesheet" type="text/css" />
    <link href="Javascript/dhtmlxLayout/codebase/dhtmlxlayout.css" rel="stylesheet" type="text/css" />

    <script src="Javascript/dhtmlxLayout/codebase/dhtmlxlayout.js" type="text/javascript"></script>

    <script src="Javascript/dhtmlxTree/codebase/dhtmlxcommon.js" type="text/javascript"></script>

    <script src="Javascript/dhtmlxTree/codebase/dhtmlxtree.js" type="text/javascript"></script>

    <link href="Javascript/dhtmlxTree/codebase/dhtmlxtree.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
 
        var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        var s;
        (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
        (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
        (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
        (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
        (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div id="parentId" style="position: relative; top: 0px; left: 0px; width: 950px;
        height: 700px; border: #B5CDE4 1px solid;">
    </div>
    <div id="objId" style="width:100%;height:100%;overflow:auto;display: none;">12</div>
    <script type="text/javascript">
        var dhxLayout;
 
        var dhtmlxAjax;
        
        
        function doOnLoad() {
            myLayout = new dhtmlXLayoutObject("parentId", "2U");
            var myTree = myLayout.cells("a").attachTree();
            myTree.setImagePath("Javascript/dhtmlxTree/codebase/imgs/");
            myTree.loadXML("./xmlFiles/AddressTree.xml?ts=" + Date.parse(new Date()));
            myTree.attachEvent("onClick", doOnTreeNodeClick);
            myLayout.cells("a").setText("menu");
            myLayout.cells("a").setWidth(200);
            myLayout.cells("b").setText("");
            myLayout.cells("b").attacthObject("objId");
        }
        function doOnTreeNodeClick(id) {

            var url = "search.aspx?searchType=1&keyvalue=" + id;
            url = encodeURI(url);
            dhtmlxAjax.get(url, doCallBack);
            

            return true;
        }
        function doCallBack(loader) {
            //do something
        }
        
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptBlock" runat="Server">

    <script language="javascript" type="text/javascript">
        doOnLoad();
    </script>

</asp:Content>

when i use attachObject() to add a div in cell,IE tell me “Object does not support property or method”.

There is the typo in the method name. Here must be

myLayout.cells(“b”).[b]attachObject/b;

instead of

myLayout.cells(“b”).[b]attacthObject/b;

I am using DHTMLX suite version 2.0, and the following code is fine for me.
dhxLayout.cells(“b”).attachObject(“objId”);

I mean that [b]attachObject/b is OK at version 2.0.

Boa

Locally the problem isn’t reproduced:

dhtmlxLayout/samples/02_conf/10_attach_object.html

dhtmlx.com/docs/products/dht … bject.html