ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: datafor on August 19, 2019, 08:56:58 am

Title: Can the total number of records not include subtotal record
Post by: datafor on August 19, 2019, 08:56:58 am
Hi
      Here is my problem:We use the remote paging. In each page there will be several detail records, and several subtotal records which are also calculated by the server side. Can the total records not count subtotal records?
      Thanks!
Title: Re: Can the total number of records not include subtotal record
Post by: paramvir on August 19, 2019, 09:48:32 pm
Total records count all kind of rows except in fixed rows at bottom, it can't be prevented.
Title: Re: Can the total number of records not include subtotal record
Post by: datafor on August 20, 2019, 03:39:57 pm
Thanks for your reply.
So, is it possible to keep the totals records from counting some of the specified rows in every page? Setting configurations or calling pqGrid api, or extending pqGrid by adding custom scripts, or otherwise?
Title: Re: Can the total number of records not include subtotal record
Post by: paramvir on August 21, 2019, 08:47:17 am
Any rows in summaryData option are not counted in total rows in grid.

https://paramquery.com/pro/api#option-summaryData

Example of usage of summaryData: https://paramquery.com/pro/demos/summary_json
Title: Re: Can the total number of records not include subtotal record
Post by: paramvir on August 23, 2019, 08:54:14 am
This workaround can be used

Add extra rows in dataReady event.

Code: [Select]
dataReady: function(evt, ui){
        //add any extra rows here by array manipulation of pageData.
this.pageData().unshift({});
},


Please note that being a workaround it may or may not work properly in upcoming versions.