DhtmlxLayout Doubt

I have few doubts about dhtmlxLayout.

In my project i have to load a form or grid in a cell based on the requirement.
for example if user clicks on a node 1 in a tree, i have to load form in cell1.
for this i can use attachForm method on cell object.

if user clicks on a node2 i have to load grid in the same cell1.
for this i can use attachGrid method on cell object.

My question is:
If i call the methods attachGrid() or attachForm() etc, on the same cell
is there any problem with performance.
Because indirectly i am creating those object(formObject,gridObject) in memory right.

Is dhtmlx taking care of the existing object, i mean is it going to destroy the existing object of that cell and creating the new or what?

Can you please provide a detail explanation on this.

Thanks in advance :slight_smile:

The best way for you is using views:
dhtmlx.com/docs/products/dht … views.html

Thanks Darya,

It is useful

Your answer Views in layout is good to manage different views in a sigle cell.
My questions are,

  1. Before creating the difault view, can i create the 2nd view.
    I mean if i have a layout with 1C layout, Before creating the default one i.e,
    before doing dhtmlxLayout.cells(‘a’).attachForm(); can i create dhtmlxLayout.cells(‘a’).view(‘gridView’).attachGrid();

2.And what if the form structure changes on the fly.
i.e, if i have the form with 6 items with edit button in readonly mode, which is loaded using loadStruct().
when i click the edit button in that form how can i load the new structure which can have only 2 items with save and cancel buttons by using the same object what i have created before using doing dhtmlxLayout.cells(‘a’).attachForm();

Please help me !

Naresh Adla

  1. It doen’t matter.
  2. Only show/hide/enable/disable combinations.