display.grid.getRecordCount()



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



Return Value

Numeric value containing the total number of records 



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