View('def') not working

Hi,
I am using dhtmlxLayout views concept.
I have a layout structure like below.

1.attaching 2e layout to a tab.
var mylayout = tabone.attachLayout(“2E”);
mylayout .cells(‘b’).view(‘details’).attachForm(somestructure);

When i need default view i am executing the below line.
mylayout .cells(‘b’).view(‘def’).setActive();

But it is not working . Always i am able to see the details view only.
Can you plz tell me what is the problem?

Thanks ,
Naresh adla

Hi
Have you other views except the discribed one?
mylayout .cells(‘b’).view(‘details’).attachForm(somestructure);

If not - do the view ‘details’ active:
mylayout .cells(‘b’).view(‘details’).setActive();

More: see the sample
dhtmlx.com/docs/products/dht … views.html
Default view (Grid) hasn’t defined name.

Hi i have two more views.
mylayout .cells(‘b’).view(‘edidetails’).attachForm(editstructure);
mylayout .cells(‘b’).view(‘adddetails’).attachForm(addtructure);

if i use mylayout .cells(‘b’).view(‘details’).setActive(); i am able to see details form.
the other two views are also working when i say setactive() on that views.

But when i need default view ,
mylayout .cells(‘b’).view(‘def’).setActive(); not rendering default view which is a plain cell object

If you have 3 view like
mylayout .cells(‘b’).view(‘details’).attachForm(somestructure);
mylayout .cells(‘b’).view(‘edidetails’).attachForm(editstructure);
mylayout .cells(‘b’).view(‘adddetails’).attachForm(addtructure);
You naven’t the default one, because you have not define it.

If you have
mylayout .cells(‘b’).attachForm(somestructure);
mylayout .cells(‘b’).view(‘edidetails’).attachForm(editstructure);
mylayout .cells(‘b’).view(‘adddetails’).attachForm(addtructure);
the 1th one will default.

Thanks Darya,
Actually i thought default view will be always an empty cell (b).
So that i created all my forms in different views. and when i need the empty cell without any forms i thought i can show the default view.

Ok so if we create more views then there will b no default view wil present right.

Thanks.

You can attach 100% empty div via attachObject and set it as default view.