سؤال

I am loading the data into slickgrid through dataview. While doing so, I noticed one thing.

If number of rows are less than 15, then everything is working properly.

But, if there are more number of rows greater than 15, grid is remaining with only 15 rows. So, the other rows are automatically deleting and adding into grid when scroll up/down is happened.

Why it so? Is there any API method to overcome this? How to handle those automatically rows adding/deleting?

هل كانت مفيدة؟

المحلول 2

Yes it is Correct.

It is because of Adaptive Virtual Scrolling feature.

Also, it is the ViewPort which holds the dynamic data/rows at any time. There is one event to handle these automatically rows adding/removing.

 onViewportChanged

we can handle this event as:

grid.onViewportChanged.subscribe(function(e, args) {
      //code here
});

نصائح أخرى

This is because of the adaptive virtual scrolling. From the slickgrid README:

Adaptive virtual scrolling (handle hundreds of thousands of rows with extreme responsiveness)

The grid will only have a subset of the total rows visible at one time. This greatly improves performance on large grids with thousands of rows.

You cannot turn off this feature because it is built into the grid to improve performance.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top