Check documentation for the latest version of dhtmlxSuite getText DHTMLX Docs


returns the text of an item

string getText();
stringthe text of an item


// 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 text of an item
var text = mySidebar.items(id).getText();
// -> {text:"new text",icon:"new_icong.png", ...}

Back to top