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 April 7, 2020

Forked from: /klaw/creating-record-paging-buttons/

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

Filters:

Popular Recent

This space illustrates the simplest way to load a Rich Display grid with data, where all records are sent to the grid in bulk.

3207

0

0

This example includes a select box on each row of the grid that allows you to change the color of that grid row. It also includes a select box that will allow you to change the text decoration for fields on that row.

3004

0

0

Updated chart themes in NodeRun.

3124

0

0

start of a possible BI tool

3193

0

0

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

3151

0

0

This workspace shows you how to add custom widgets to your project

3149

0

0

RPG Application that allows you to work with Insurance Claims converted to Node.js to run in the cloud, using any database

3165

0

0

Simple example of a real world business application

3351

0

0