Page tree
Skip to end of metadata
Go to start of metadata

The getRecordCount() method returns the total number of records in a grid.


Return Value

Numeric value containing the total number of records 



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" }
console.log(display.mygrid.getRecordCount());  // outputs 4