I’m lost.
myTreeTable.attachEvent(“onScrollY”, function() { var state = this.getScrollState(); var id = this.getIdByIndex(state.y); =====> this.getItem(id) is supposed to give me the item in the treatable ??? loadDynamic(id, data); this.refresh();
state.y is the scroll top position of the view, it can’t be used in the getIdByIndex, that expects numeric index of item, not the view position.
You can try to use Math.round(state.y / item_height) to get the index of top visible item.
Thanks a million ! It works… but finally i changed the approach.