/
display.grid.pop()
display.grid.pop()
The pop() method removes the last record in the grid and returns that record as a JavaScript object.
Return Value
JavaScript object with properties for each field 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" }
]);
display.mygrid.pop();
console.log(display.mygrid.getRecords());
// The line above will log the following output:
// [ { product: 1, description: "ITEM ONE" },
// { product: 2, description: "ITEM TWO" } ]
, multiple selections available,