Add jsGrid http://js-grid.com tables to your website using the shortcode: [nmr_jsgrid id='your-grid-name'].
Data grids or tables have configurable number of columns, filters, edit, update and delete functionalities.
Configuration of grids is performed on the admin back-end.
Tables can be paginated and need back-end pagination. Ajax calls help to avoid entire page reload.
Example of a toy back-end pagination:
Having prepared the back-end to provide paginated data, the front-end data-grid cand be built in the Admin->NMR jsGrids interface.
Add a row and set the column values accordingly.
Please consult the documentation for more details:
Namewill be used as DOM id for the data-gridURLback-end endpoint, usually https://your-website.com/wp-admin/admin-ajax.phpActionshould be sincronized with back-end. In our exampleAction=sample_paginationtaken from:wp_ajax_nopriv_sample_paginationFieldsJSON array of columns as text. In our example could be:
[{“name”: “umeta_id”,”title”: “Id”,”type”: “number”},{“name”: “meta_key”,”title”: “Key”,”type”: “text”}]
For a complete list of possible columns check the documentationHeightcould beauto, a percent like80%, a number:400Widthsame as abovePaging,Editing,Sorting,Autoload,Deleting,Filtering,Inserting,Page sizeare self explanatory: allow pagination, editing, sorting, auto-loading, deleting, filtering and inserting of data. Page size determines the number of rows in one page.Pager formatcan have a value of: Rows: {itemCount} – Pages: {first} {prev} {pages} {next} {last} {pageIndex} of {pageCount}Page buttons5 is a good choice
Plugin will enqueue nmr-jsgrid.js javascript file.
To use the plugin on the Admin module one should add the Admin slug/hook in the filter: nmr_jsgrid_admin_enqueue_scripts
Ex:
If you enjoy using NMR JSGrid and find it useful, please consider making a donation. Your donation will help encourage and support the plugin’s continued development and better user support.

评论0