The following components can be attached to a window's cell:
To attach a DHTMLX component to a window's cell - make the following steps:
Note, you can insert windows into each other to create various complex structures.
var dhxAccord = myWins.window("a").attachAccordion();
var dhxBar = myWins.window("a").attachToolbar();
var dhxDataView = myWins.window("a").attachDataView();
var dhxEditor = myWins.window("a").attachEditor();
var dhxForm = myWins.window("a").attachForm();
var dhxGrid = myWins.window("a").attachGrid();
var dhxLayout=myWins.window("a").attachLayout();
var dhxMenu = myWins.window("a").attachMenu();
var dhxSBar = myWins.window("a").attachStatusBar();
var dhxTabbar = myWins.window("a").attachTabbar();
var dhxTreeGrid = myWins.window("a").attachTreeGrid();
var dhxTree = myWins.window("a").attachTree();
These methods, except attachStatusBar(), return dhtmlx[component] objects, which you can customize according to your needs.
If you want to attach dhtmlxGrid with paging - use the attachObject() method that attaches container with grid and paging area:
myWins.window("a").attachObject("paging_container");
Please note, attachScheduler differs from the other attach[component] methods. The reason is that attachScheduler not only attaches the component but also initializes it, creates an instance with the predefined structure.
Therefore:
var myWins = new dhtmlXWindows()
myWins.createWindow("about", 50, 50, 300, 200);
scheduler.config.xml_date="%Y-%m-%d %H:%i";
myWins.window("a").attachScheduler(null,"month", "scheduler_here");scheduler.load("../common/events.xml");
Sometimes using layout, you may need to show a pop-up window. Make the following steps for it:
// creating layout instance
var myLayout = new dhtmlXLayoutObject("3L");
...
// creating pop-up window from layout's dhtmlxWindows' instance
var popupWindow = myLayout.dhxWins.createWindow("popupWindow", ...);
There are cases when some windows' ids are already used by layout so you can't use them for creating another windows. How can you identify the ids you are not allowed to use? There is a function that allows you to check availability of any 'id':
// check if id in use
if (myLayout.dhxWins(id)) {
// id is already in use, checked id can not be used for new window
} else {
// id is free for use
}
Back to top