Hello DHTMLXSUPPORT,
I have the following code :
CEM = { };
CEM.dhxGrid = ;
CEM.dhxGrid.setImagePath(“dhtmlx/skins/web/imgs/dhxgrid_web/”);
CEM.dhxGrid.setHeader(“A,B,C”);
CEM.dhxGrid.setInitWidths(“150,300,*”);
CEM.dhxGrid.setColAlign(“center,left,left”);
CEM.dhxGrid.setColSorting(“int,str,str”);
CEM.dhxGrid.setColTypes(“ro,ro,ro”);
CEM.dhxGrid.enableColSpan(true);
CEM.dhxGrid.setSkin(“dhx_web”);
CEM.dhxGrid.init();
CEM.dhxGrid.loadXML(“app/xml/b/gridA.xml”);
//gridA.xml file
a1
b1
<![CDATA[font color="blue">VIEW]]>
a2
b2
<![CDATA[font color="blue">VIEW]]>
a3
b3
<![CDATA[font color="blue">VIEW]]>
…
an
bn
<![CDATA[font color="blue">VIEW]]>
CEM.view : function(id){
var idx = CEM.dhxGrid.getRowIndex(id) + 1;
if(CEM.dhxGrid.doesRowExist(‘view’))
AK.ddalap.dhxGrid.deleteRow(‘view’);
CEM.dhxGrid.addRow(‘view’,[’ ‘,’ ‘,’ ‘],idx);
CEM.dhxGrid.setColspan(‘view’,0,3);
CEM.dhxGrid.cells(‘view’,0).setValue(’<div id=“viewTabbar” style="width:100%; height:450px; margin-top:15px; margin-left:5px;>’);
CEM.dhxTabbar = new dhtmlXTabBar({
parent: "viewTabbar",
arrows_mode: "auto",
tabs: [
{id: "a", text: "<div style='font-size: 9pt;'>A</div>", active: true},
{id: "b", text: "<div style='font-size: 9pt;'>B</div>"},
{id: "c", text: "<div style='font-size: 9pt;'>C"}
]
});
CEM.dhxTabbar.enableAutoReSize();
CEM.dhxGridA = CEM.dhxTabbar.tabs("a").attachGrid();
CEM.dhxGridA.setImagePath("../../../codebase/imgs/");
CEM.dhxGridA.setHeader("A,B,C");
CEM.dhxGridA.setInitWidths("*,100,100");
CEM.dhxGridA.setColAlign("left,center,center");
CEM.dhxGridA.setColTypes("ro,ro,ro");
CEM.dhxGridA.setColSorting("str,int,int");
CEM.dhxGridA.enableAutoHeight(true);
CEM.dhxGridA.init();
CEM.dhxGridA.loadXML("xml/tabbar/gridTabA.xml", function(
CEM.dhxTabbar.setSizes();
));
CEM.dhxGridB = CEM.dhxTabbar.tabs("b").attachGrid();
CEM.dhxGridB.setImagePath("../../../codebase/imgs/");
CEM.dhxGridB.setHeader("A,B,C");
CEM.dhxGridB.setInitWidths("*,100,100");
CEM.dhxGridB.setColAlign("left,center,center");
CEM.dhxGridB.setColTypes("ro,ro,ro");
CEM.dhxGridB.setColSorting("str,int,int");
CEM.dhxGridB.enableAutoHeight(true);
CEM.dhxGridB.init();
CEM.dhxGridB.loadXML("xml/tabbar/gridTabB.xml", function(
CEM.dhxTabbar.setSizes();
));
CEM.dhxGridC = CEM.dhxTabbar.tabs("c").attachGrid();
CEM.dhxGridC.setImagePath("../../../codebase/imgs/");
CEM.dhxGridC.setHeader("A,B,C");
CEM.dhxGridC.setInitWidths("*,100,100");
CEM.dhxGridC.setColAlign("left,center,center");
CEM.dhxGridC.setColTypes("ro,ro,ro");
CEM.dhxGridC.setColSorting("str,int,int");
CEM.dhxGridC.enableAutoHeight(true);
CEM.dhxGridC.init();
CEM.dhxGridC.loadXML("xml/tabbar/gridTabC.xml", function(
CEM.dhxTabbar.setSizes();
));
}
Is there a way of CEM.dhxGrid row with id “view” to resize its height dynamically adjusting its content’s height (CEM.dhxTabbar) ?
Above code, the height of CEM.dhxGrid row with id “view” is always at 450px.
Best regards,
Cemang.