BUG: Pagination with grid data

When u initialize a Pagination widget with grid data and later add data to the grid using the grid.data.add method, the pagination doesn’t behave as expected.

When you click to go to the next page for example it stays black.

Here is an example:
https://snippet.dhtmlx.com/1z0b6o6y

Please use grid.data.parse(dataset); instead of grid.data.add(dataset);

here is snippet:

https://snippet.dhtmlx.com/4y2cfmna

What if new data is being added to the grid. I simply want to add an extra row to the existing, instead of reloading the whole dataset.

try this;

grid.data.add([
{
value: " ITEM 1001",
a: 1001
} ]);

In the description of the post it is clearly mentioned that data.add method doesn’t work with pagination.

here is another snippet, click the button and add extra 500 items

https://snippet.dhtmlx.com/n06nixmy

Thanks for the effort to provide this nice snippet.

However this snippet calls:

grid.data.parse(dataset); // <— here

BEFORE

grid.data.add

If your layout is designed to load with empty dataset, which later gets populated by user’s action (imagine he opens a modal with a form and input some data and then clicks “save” and the data gets attached to the grid). when you go to the second page of the pagination it doesn’t display any data.

Here is your snippet which demonstrates what i am pointing.

https://snippet.dhtmlx.com/co16lt2i

Overall this is very confusing and buggy. Also i have submited few issues with columns where some of the methods don’t work as expected if you load the grid with empty dataset and later populate it.

TOTALLY BUGGY AND UNRELIABLE PRODUCT.

with 7.0.3 pro https://snippet.dhtmlx.com/co16lt2i works well but after 7.0.3 pro it is behave as you said.

Thank you for your report. The problem was confirmed.We’ll try to fix it in one of the future updates.
I’ll inform you about any progress on this issue.

For now I can suggest you to use the parse()/load() method for the initial data populating.

Hello Nikolai.

We fixed your reported problem in the latest dhx.Suite update (8.3.4).
Now populating the data with the data.add() method should work well in the paginated grid.
You can test it in your original snippet:
https://snippet.dhtmlx.com/1z0b6o6y
Please. download the latest available dhx.Suite build from your client’s area to get this fix.
Thank you for your report.
Best regards.