Here everyone, i learning and try to build using dhtmlx here
recently i using layout 2U, and i attachSidebar to cell(“a”)
But how to attachEvent to the attached sidebar? so i can know user click on which item
hope you guy/gal can understand my question, any way here is my code
var aCell = myLayout.cells(“a”);
aCell.setText(“Left Menu”);
aCell.setWidth(270);
aCell.attachSidebar({
width: 300,
icons_path: “icons_material/”,
json: “common/sidebar.json”,
attachEvent: doOnItemSelect // like this ???
});
function doOnItemSelect(id) {
alert("clicked " + id);
}
my sample can be view from HERE