Import server-side data
Grid.js supports global search on all rows and columns. Set
search: true
in your JS configuration to enable the search plugin. Optionally you can also add server
config to your search definition to enable server-side search. Besides generic settings, you can also specify a custom selector to customize searchable fields and tell the engine to ignore hidden columns (they are searchable by default).
Server side search
Add
server
config to your search
definition to enable server-side search. To load and import data from a remote URL. Server storage uses fetch
API to send the call and fetch the data. Note - server base URL is required in any server side implementation, whether it's a data load or sort/pagination/search configuration
Server side pagination
Add
server
property to the pagination
config to enable server-side pagination. Also, make sure the total
property is correctly defined in the main server
config block. Multiple customization options are available for both client and server side pagination configuration: limit, starting page, labels, language, number of buttons etc
Server side sorting
Simply add
server
config to the sort
block to enable server-side sorting. In the following example we fetch the data from remote source and disable sorting in the "Image" column just like we would disable sorting in a regular grid configuration. Sort has 2 config options: 1) Generic config: to enable sort for all columns, enable multi column sort, server-side integration etc; 2) Column specific config: to enable sort on a specific column, to set custom comparator function, etc