The replaceRecords() API clears a grid and then adds an array of records to it.


(info) Each element of the array is a JavaScript object with properties representing the fields in the grid.


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

Video Tutorial

<div align="center" style="position:relative;height:360;width:640"><iframe width="640" height="360" src="" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe></div>