Check documentation for the latest version 6.0 of dhtmlxSuite getAllItems DHTMLX Docs

getAllItems

returns an array of the sidebar items' ids

array getAllItems();

Returns

arrayarray with items ids

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"}
    ]
});
 
// get a list of items
var ids = mySidebar.getAllItems(); // -> ["a1", "a2"]

Back to top