Creating Record Paging Buttons

About This Space

Expanded version of the Grid template to add additional paging buttons and modify how the data is supplied to the Grid widget.


Last updated on March 19, 2020

Public Permissions:   View   Open/Fork   Run   Comment  

Paging Buttons

This example was built using the Loading a Grid Template.

I modified the grid to instead be database driven and to not use the replace records api.

I then added the buttons to the side of the grid that will page the grid up and down.

The buttons themselves query the DOM looking for the elements that have the CSS class of the paging controls and then click that item.

This solution has some limitations. Namely, the grid widget must have the paging bar property enabled. Addtionally, this also means that you cannot have a second grid on this screen as the the current dom query selector only selects the FIRST element on the screen that contains that CSS class.

I made a small edit afterwards to add the page number at the bottom of the grid and then used some JavaScript to show how many pages total are in the grid.

This example is locked for editing, but if you want to create your own sandbox that is a copy of this example, simply use the fork option.

If you have any questions about this example, please reach out on the discussion forum (http://discuss.noderun.com/login), as I don't plan to monitor comments on this space.

Be the first to comment:      

Comments

Write Preview Markdown: bold italic code link
Post

More Spaces By klaw (@klaw)

Filters:

Popular Recent

Have some fun with this Connect 4 application!

2860

1

8

This is a variation on the Connect 4 App that will enable multiplayer support.

1898

2

0

A simple Rich Display app that shows how to focus a widget via JavaScript

1291

0

0

This app consumes a web service and display the information in a grid

1145

0

0

This app consumes a web service and display the information in a grid

1116

0

0

A Rich Display File application that stored the focus in a hidden field and uses that field to apply focus when the screen is re-drawn.

1091

0

2

A demo application that uses the sendmail npm package to send an email.

1052

1

0

This is a simple task list that stores tasks on a per user basis, and has a reset all button. Good for tasks that must be completed on a regular schedule like daily, weekly or monthly tasks.

1049

0

0

This interactive app prompts the user for key fields to lookup a database record and displays the results

1030

0

0

This is a full database maintenance CRUD application with view, change, add, and delete capabilities

981

0

0

Static HTML Hello World App

971

0

0

Displaying information in grids is fundamental to developing applications. This demo application displays a list of products in a grid.

967

0

0