I'd like to be able to export a grid to pdf with a page break after each group. If there are multiple groups, it would just break after the first group definition (i.e., the outermost group). Is that possible?
Thank you.
Hi Balaji, Thanks for the reply. Are there any hooks, events, or other intercepts we can use to programatically do this? Like for example, we implemented similar functionality when printing the grid by using the beforePrint event, as follows:
pageBreakAfterEachOuterGroup is called by beforePrint:
Hi Balaji, Sorry for the slow reply. Yes I need a page break after each outer group. For example, if the grid is grouped by field1, field2, and field3 (in that order), then there should be a page break after each group of field1 only. Is that possible?
Thanks.
Hi Sujith,
Page break by group works on the following stackblitz:
https://stackblitz.com/edit/k1q7ik-shguma?file=index.ts
Just group Country column to grouping header, and print.
The two changes I had to make to your stackblitz are:
1) Change the following line of code:
pageBreakRow.innerHTML = '<td><div></div><div></div></td>';
It seems that the html tags didn't display properly in my previous post.
2) Add css to index.html for the page break.