Progresson possible for a single tab?

Hi

I wanna add a progressbar to a single tab (not the whole layout or a cell).
That didn’t works for me with the following code.

Any ideas to solve my problem ?

Thank you very much !!!

Regards,
Franky

//----------------------------------------------------------------------------
//- create global tabbar
//----------------------------------------------------------------------------
tabbar = layout_main.cells(“b”).attachTabbar();
tabbar.setImagePath(“codebase/imgs/”);
tabbar.setSkin(“dhx_web”);
tabbar.enableTabCloseButton(true);

function view_alert_system_status() {
//check if the tabbar exists
if (check_tab(tabbar.getAllTabs(),“SAS”)) {
tabbar.setTabActive(“SAS”);
}
else {
tabbar.addTab(“SAS”, “Status Alertsystems”, “*”);
tabbar.setTabActive(“SAS”);
}

SASGrid = tabbar.cells("SAS").attachGrid();
SASGrid.setHeader("<B>Systemname</B>,<B>Status</B>");
SASGrid.setInitWidths("100,100");
SASGrid.setColAlign("left,left");
SASGrid.setColTypes("ro,ro");
SASGrid.enableTooltips("false,false");
SASGrid.init();
//progress on

tabbar.cells(“SAS”).progressOn();
tabbar.cells(“SAS”)._progressCover[1].style.backgroundImage = “url(‘style/images/progress_bar.gif’)”;

[b]// if I do it that way the whole cell b where all my tabs are attached is locked
// but I wanna lock only the new created tab

// layout_main.cells(“b”).progressOn();
// layout_main.cells(“b”)._progressCover[1].style.backgroundImage = “url(‘style/images/progress_bar.gif’)”;[/b]

SASGrid.loadXML("scripts/perl_driver.php?func=SAS&str=show_events.pl -h "+sys_name, function(){
		SASGrid.forEachRow(function(id){
			//color the status
			if (SASGrid.cellById(id,1).getValue() == "OK")    SASGrid.setCellTextStyle(id,1,"background-color: green");
			if (SASGrid.cellById(id,1).getValue() == "ERROR") SASGrid.setCellTextStyle(id,1,"background-color: red");
		})
	//progress off
	tabbar.cells("SAS").progressOff();

// layout_main.cells(“b”).progressOff();
})
}

Hi
You need to attach it this tab 1C layout without header and attach your grid in it. It is a singular approach.

Hello Darya

First, thank you very much for your answer ! :smiley:

I didn’t understand exactly what you mean with Layout 1C, could you please add a example for your solution ?

Thank you very much !!!

Regards,
Franky

Something like this:

dhxLayout = new dhtmlXLayoutObject(document.body, "2E"); tabbar = dhxLayout.cells("b").attachTabbar(); tabbar.setImagePath("../dhtmlx_pro_full/imgs/"); tabbar.setSkin("dhx_skyblue"); tabbar.addTab("a1", "Tab 1-1", "100px"); tabbar.setTabActive("a1"); progressLayout = tabbar.cells("a1").attachLayout("1C"); progressLayout.cells('a').hideHeader(); gridboxTop = progressLayout.cells("a").attachGrid(); gridboxTop.setImagePath("../dhtmlx_pro_full/imgs/"); gridboxTop.setSkin("dhx_skyblue"); gridboxTop.setSkin("dhx_skyblue"); gridboxTop.attachEvent("onXLS", function(mygrid,count){ dhxLayout.cells("b").progressOn(); }); gridboxTop.attachEvent("onXLE", function(mygrid,count){ dhxLayout.cells("b").progressOff(); }); gridboxTop.init(); gridboxTop.loadXML("../___xml/grid_default.xml", function () { });