hi,
we are using dhtmlx2.0 licensed
How to attach dhtmltoolbar to a specific tab
For example (DHX DB Admin sample site)
dhtmlx.com/docs/products/dem … index.html
When ever you select any table (employees), a new tab is creating and which will have its own toolbar, i try to find an example about it. but i couldnt find, can you send me steps how to implement toolbar to a specific tab.
regards
rahul.
Hello,
You can use attachToolbar() method. But the libraries of dhtmlxwindows and dhtmlxtabbar_wins.js must be also included:
tabbar.cells(tabId).attachToolbar();
Unfortunately, we don’t have a ready sample.
Hi,
I did that but its not working what js files do i need to include for that ?
webBar = parent.dhxTabbar.cells(“TelephoneLines”).attachToolbar();
webBar.loadXML("…/dhtmlxtoolbar.xml?etc="+new Date().getTime());
webBar.attachEvent(“onClick”,function(id){
switch(id){
case “1”:
alert(“Not Implemented!”);
break;
case “2”:
alert(“option 2!”);
break;
case “3”:
alert(“option 3!”);
break;
case “4”:
alert(“option 4!”);
break;
}
}
);
for this code i am getting the following error this.tabbar.adjustOuterSize();this.tabb…st[1])}}};this.dhx_Event();return this}; in dhtmlxwindows.js (line 86)
can you find a solution for this asap
Sorry for the misleading inforamtion. The provided approach can be used if tabbar is inside layout.
If the tabbar is not placed inside layout, the correct code is:
var wins = new dhtmlXWindows();
var toolbar = tabbar._cells(wins,“TelephoneLines”).attachToolbar();
toolbar.loadXML("…/dhtmlxtoolbar.xml");
Please, check that dhtmlxwindows_wtb.js is included. This file is necessary for window and toolbar implementation.
Also dhtmlxtabbar_wins.js (the tabbar extension) is necessary.
Still i am getting the same Error this.tabbar.adjustOuterSize();this.tabb…st[1])}}};this.dhx_Event();return this}; at dhtmlxwindows.js (line 86)
Please, take a look at the attached sample.
Also you can use a simple way to toolbar initialzation:
You can just place the toolbar container into the necessary tab and call toolbar intialization code.
tabbar_toolbar.zip (98.1 KB)