Hi, I’m trying to figure out how to make a datatable scroll to the last row when it gets data.
In order to do this, I’m trying to attach and event handler to the table’s datacollection.
However, the collection does not seem to be firing events correctly when data is added.
Any suggestions?
David
You need to consider also that scroll will work after the full initialization of the datatable. Therefore, you need to use the ready
handler for the datatable:
http://webix.com/snippet/1a4bceae
Thanks, though in my case, the rows are being pushed from the server intermittently to the datatable (i.e: like a chat box).
Hi, I figured an easier way, because for some reason, that doesn’t rely on making finding the node by it’s id (which isn’t working for me).
Also, I was actually needing to scroll a list, not a datatable:
on: {
onAfterRender: webix.once(function () {
this.showItem(this.getLastId())
})
}