PDFGrid Subtotal on each page - not in footer

Hi,

I'm trying to figure out how to get placed some kind of text + subtotal for grid rows on current page.

Let's say i have an three pages extending grid. I want text + subtotal on page 1 + 2. On page 3 i want the sum of entire grid column.

I have found an article explaining something similar with having sums in footer area which is not what I need.


Thanks for reply / Regards

Calogero



5 Replies 1 reply marked as answer

CF Calogero Fontana August 3, 2021 11:33 AM UTC

I guess i have choosen wrong control. I have not found a way how to change it. 

Maybe if there is some admin around who can change it to "gridControl"? Would be a better place i think.


Kind regards.



GK Gowthamraj Kumar Syncfusion Team August 3, 2021 02:34 PM UTC

Hi Calogero, 
 
Thank you for contacting Syncfusion support.

 
We can calculate the sum of grid column on each page by using EndPageLayout and EndCellLayout and event helpers. Using this event, we can sum the grid column values manually and draw it on the same page. On final page, we can draw the overall sum values of the particular column. We have created a simple sample to achieve your requirement, attached the sample and output document for your reference. Please find the sample from below, 
 
 
Kindly try the above sample on your end and let us know whether it is suites or not. 
 
Regards, 
Gowthamraj K 



CF Calogero Fontana replied to Gowthamraj Kumar August 3, 2021 04:56 PM UTC

Hi,

thx for your input. Works like a charme!!

I'm trying to add a currency character into the column which is going to be summarized.

I get an exception because the character is added before calculating. So cell value is not a valid number anymore.

I was playing around with available events but dont get it work.


Do you have an advice for this or do i need to open a new thread?


Thanks again / Regards,

Calogero



GK Gowthamraj Kumar Syncfusion Team August 4, 2021 02:58 PM UTC

Hi Calogero, 
 
Thank you for your update.

 
We can draw and calculate the PDFGrid column values with currency symbol in the PDF document. We have attached the modified sample and output document for your reference. Please find the sample from below, 
 
Kindly try the above sample on your end and let us know if it is suites your requirement or not. 
 
Regards, 
Gowthamraj K 


Marked as answer

CF Calogero Fontana replied to Gowthamraj Kumar August 5, 2021 05:19 AM UTC

Hi  Gowthamraj,

working perfectly! Thank you very much.


Marking as resolved!


Kind regards,

Calogero


Loader.
Up arrow icon