display.grid.push()
The push() methods add a record (or multiple records) to a grid.
Parameter
JavaScript object with properties representing fields in the grid
One or more additional JavaScript objects to add to the grid (optional)
Example
pjs.defineDisplay("display.json"); // assume display.json defines mygrid with fields named "product" and "description"
display.mygrid.push({ product: 1, description: "ITEM ONE" }); // Add 1 record
Â
display.mygrid.push({ product: 2, description: "ITEM TWO" }, { product: 3, description: "ITEM THREE" }); // Add 2 records