Check documentation for the latest version of dhtmlxSuite items DHTMLX Docs

items

returns dhtmlXSideBarCell instance (sidebar's item)

dhtmlXSideBarCell items(string|number id);
idstring|numberitem id
dhtmlXSideBarCelldhtmlXSideBarCell instance

Example

// init sidebar
var mySidebar = new dhtmlXSideBar({
    parent: "sidebarObj",
    template: "details",
    icons_path: "icons/16x16/",
    width: 160,
    items: [
        {id: "a1", text: "Item 1", icon: "image1.png", selected: true},
        {id: "a2", text: "Item 2", icon: "image2.png"}
    ]
});
 
// getting item
var item = mySidebar.items("a1");
 
// attaching something
var myGrid = item.attachGrid();
 
// the same but shorter
var myGrid = mySidebar.items("a1").attachGrid();

Back to top