JSON format
In order to import JSON (or an array of objects), simply change the data input to [{ key: value }, ... ]. Grid.js expects each column to have a unique id field which matches the keys in the data object. id field accepts a function as well. If you have a complex JSON object, pass a function to id and try to refine and format your data. Tip - Grid.js tries to guess the id of columns by camelCasing them if column ID is not defined. E.g. Phone Number becomes phoneNumber.
XML format
Using the handler callback you can parse and handle HTTP calls yourself. The default handler tries to cast the response to a JSON format, but you can override it to parse the data in a different format. In this example, we are our demo.xml file which is a XML formatted document. We also enabled all core plugins in this example: sort, search and pagination.
Async data import
The data attribute accepts an async function, too. This is useful for making any external HTTP calls and loading data from a server. Here we have passed a function to the data attribute which returns a Promise object and resolves the data after 1 second.
Activity
New notifications
James has completed the task Submit documents from Onboarding list
2 hours ago
Margo has added 4 users to Customer enablement channel
3 hours ago
Subscription #466573 from 10.12.2021 has been cancelled. Refund case #4492 created
4 hours ago
Older notifications
Nick requested your feedback and approval in support request #458
3 days ago
Mike added 1 new file(s) to Product management project
new_contract.pdf
112KB
1 day ago
All hands meeting will take place coming Thursday at 13:45.
2 days ago
Christine commented on your community post from 10.12.2021
2 days ago
HR department requested you to complete internal survey by Friday
3 days ago
Loading...
Demo configuration
Color mode
Direction
Layouts
Purchase Limitless