How to place vscroll into the app without using div elements ?

http://webix.com/snippet/b3bc387e
For our current project, we looking for a workaround to handle an infinite scrolling for a datatable, because the data to present have no index (only timestamps or indexes and subindexes) and the end is changing over the time. The data are loaded via websockets. So the idea is to handle the scrolling and loading by our self. Unfortunatly I can not control the scroller object of the dataTable itself, the idea was to place vscroll behind the table and handle it like a surrogate. But I’m not able to place the vscroll. In the snippet I added a template, where I want to have a vscroll instead. Is it possible to place a vscroll without setting a div to it’s container?

Best Regards
Matthias

Please check http://webix.com/snippet/84fb8015

vscroll was a byproduct of datatable, so it is not a fully functional view component. Still it can be initialized in any HTML container on the page.

Also, I think that you can use a normal datatable, just load a limited set of data first ( for example last 1000 rows ) and add the onScrollY handler. When users scrolls to the end of datatable you will be able to send a request to server side and fetch extra data, that can be added to the grid.

Hello Maksim,

great compliment for your support!
We are evaluating different JS GUI frameworks as an base for a commercial application.
We would also like to use the datable, but I think it’s not working in the way we need.
In the datatable we want to display decoded message information. These messages are stored in files and will be decoded on the fly by the back-end sw and given as Json data via a websocket connection to the webix front-end. The single dataset (decoded message) has a timestamp information, but no index and this makes the problem with the datatable. The back-end has only access to position their view by calling getFirst(), getLast() or getAt(timestamp). After that additional data can be retrieved by calling getNext() or getPrev(). Also the total count of events is in some situations not available or constantly increasing. Basically we need some kind of virtual datatableview. Eg. the control should only handle a virtual view of the whole dataset and give us the possibility to control scrolling by our own. Maybe some kind of caching is needed between virtual datatableview and back-end.
Unfortunately the webix datatable is generating scroll events only, when a “total_count” value is set, which must be greater as the visible/currently given number of datasets.

Best Regards, Matthias

If you plan to render a custom scrollbar, you will need to define some size for it anyway, and it doesn’t differ from total_count so much. In one case, you define some inner height for scroll, in other total_count value for datatable. In both cases, the number may not represent the actual number of rows on server-side, but just gives some visual clue to a user.

When user scrolls the datatable, he generates datarequest event, which can contain any kind of custom data retrieving logic.