Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ram Chander Singh on Feb 19, 2009 03:26
open dhtmlx forum
dhtmlxLayout inside dhtmlxlayout

Hello,

I have a layout design "2U", and inside it (in cell 'b') i added one more layout design 1C and inside 1C , i added a GRID.

issue here is, when i hide cell 'a' of 2U, then cell 'b' takes complete available space but inside cell 'b' layout (1C) don't expands and it leaves blank space .

Can you please suggest me how inside Layout of a cell can also take width as in percentage.

Looking forward for your prompt response,



Thanks & Regards,
Ram
Answer posted by Support on Feb 20, 2009 06:10
Hello,

>> inside cell 'b' layout (1C) don't expands and it leaves blank space
All works fine on our side,  here is a demo.

>> how inside Layout of a cell can also take width as in percentage
Unfortunately layout's size could not be set in percent.
Attachments (1)
demo.zip213.12 Kb
Answer posted on Feb 22, 2009 21:25

Answer posted on Feb 22, 2009 22:08
Thanks for your response, it working..!!

But in my case things are as below:

I have Layout in File "A.html" code of A.html is
========================================
<div id="workspace_wrapper" style="width: 100%; height: 80%;"></div>

<script>
    var wrapperLayout = new dhtmlXLayoutObject("workspace_wrapper", "2U");
    var menuCell = wrapperLayout.cells("a")
    menuCell.setText(" ");
    menuCell.setWidth(200)
    var menuAccordian = menuCell.attachAccordion()
    var workspaceCell = wrapperLayout.cells("b")
    menu.fillAccordian(menuAccordian, workspaceCell)
   menuAccordian.cells('/clinicals/results').open();
   menuAccordian.setEffect(true);
  var status = wrapperLayout.attachStatusBar();
  status.setText("Done");
========================================
As you can see in Layout "2U", inside cell 'a' i am filling with Accordian
and inside each Accoridan i have filled with "href" using javascript,
in each "href" link iam calling a "B.html" on onClick.

B.html code is as below:
============================================
<div id="workspace" style="width: 100%; height: 100%; margin: 0; "></div>
<script>

    var workspaceLayout = new dhtmlXLayoutObject("workspace", "2E");
    var masterCell = workspaceLayout.cells("a")
    var detailCell = workspaceLayout.cells("b")
//masterCell.setText(" ");
//detailCell.setText(" ");
    masterCell.hideHeader();
    detailCell.hideHeader();
workspaceLayout.setEffect("resize", true);
workspaceLayout.setEffect("collapse", true);
 var masterGrid = masterCell.attachGrid();
 var detailGrid = detailCell.attachGrid();
============================================
in "B.html" file Layout is '2E', and in this Layout cell a i have attached a GRID.



Issue is:

When i collapse cell 'a' of A.html , cell 'b' expandes 100% - this is correct.
but, as you can see inside cell 'b', we are calling another html file (B.html- this is having div -100%, layout and Grid), in this file alyout doesn't expandes to 100%.

Please let me know if is there any fix for it.



Regards,
Ram

Answer posted by Support on Feb 23, 2009 06:46
It's clear now, this happens because layout attached to object does not fill to size of object if last was changed.
Try to use fullscreened-init for cell "b". Here is a demo.
Attachments (1)
demo.zip1.09 Kb
Answer posted on Feb 24, 2009 01:51
Thanks, :)
it's working..!!