Author Topic: How do I get totalRecords count?  (Read 5218 times)

Robert

  • Pro Economy
  • Newbie
  • *
  • Posts: 26
    • View Profile
How do I get totalRecords count?
« on: April 18, 2014, 08:16:40 am »
Hi,

This may be a silly question but I can't seem to find an example where someone has pulled the totalRecords count.

Is it possible to get the totalRecords integer in such a way similar to this:

var recID = $grid.pqGrid("getRecId", { rowIndx: rowIndx });

Thanks in advance!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How do I get totalRecords count?
« Reply #1 on: April 18, 2014, 10:55:52 am »
That makes sense.

Total number of records is the length of dataModel.data.

var totalRecords = $grid.pqGrid('option', 'dataModel.data' ).length;

It can also be obtained from pageModel.

var totalRecords = $grid.pqGrid('option', 'pageModel.totalRecords');

Robert

  • Pro Economy
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: How do I get totalRecords count?
« Reply #2 on: April 18, 2014, 03:56:15 pm »
excellent. thank you!