display.grid.addRecords()



The addRecords() API adds an array of records to a grid.

Parameters


  • array of records
    Each element of the array is a JavaScript object with properties representing the fields in the grid.

Example

pjs.defineDisplay("display.json"); // assume display.json defines mygrid with fields named "product" and "description" display.mygrid.addRecords([ { product: 1, description: "ITEM ONE" }, { product: 2, description: "ITEM TWO" }, { product: 3, description: "ITEM THREE" }, { product: 4, description: "ITEM FOUR" } ]);

Video Tutorial