Is it possible to add pagination to gojs table

Hi there,

I am trying to create table using gojs diagram and this table can have thousands of rows in it. Is it possible to add pagination to the gojs table diagram?

Yes, this is quite possible. Would you expect that the data for the whole table be present in memory or that you would need to load a page’s amount of data asynchronously?

In my case all the table data will be there in the memory and I will not be doing server calls to load next set of data. Can you provide me link or some documentation about the same. I searched for pagination in gojs but did not find anything relative.

Thanks in advance

I’ll create a sample for you.

That would be great. Thank you so much :)

I just tried a sample with 3130 items in the itemArray, and found that the node is created pretty fast. Are you sure you need such “paging” functionality?

Yes Walter. Actually I am not sure how many items my table can have. Also scrolling down 3000 items is not user-friendly. I want show table on the top half of the page and something else below it. So it would be good to have pagination.

Could you please explain what you want in some more detail?

Sure Walter.
I want to create table using gojs diagram. Something like this scrolling table Scrolling Table from gojs samples.
But I want pagination like below one as my table can have thousands of rows in it so it would be good to have pagination.
image

Please check my previous replies and questions in this thread. In your previous reply, you said it’s possible and you can create sample for me. Please if you can do create one for me. Thanks in advance

Thanks for the screenshot/sketch. Is that example implying that there are at most 15 items in the Array? What numbers/buttons should be shown when there are 3130 items in the Array?

And what do the “<<” and “>>” buttons do?

And when are the buttons shown? All the time, or only when the node is selected, or some other criteria?

Yes in the screenshot there are 15 items but users can see only 5 at a time and to see next set of five items they have to use numbered buttons or >> button.
If my table has 3130 items in it that means 3130/5 or 626 buttons and << & >> buttons.
But it will not look good to show those many buttons so if you refer this below link I want to achieve something of that sort.
Link : https://codepen.io/yasser-mas/pen/pyWPJd

Here you can see only three numbered and < & > buttons are shown for pagination.

I hope what I am saying is clear enough now. If its still not you can create any pagination sample that is in your mind for tables and share with me.

Thanks

OK, try Table Pagination
As always, the complete source code is in the HTML page.