i want to display header only on then first page. I managed to display it only on first page either by making GroupingGridPrintDocumentAdv.HeaderHeight = 0, or by removing the handler of GroupingGridPrintDocumentAdv.DrawGridPrintHeader, but the header place is still reserved as shown in the file i attached.what i want is to make the grid in the second page fills the hole page excepting the footer place.
It worked for the grid to occupy the header place, but still not filling the hole page.
I also noticed (in your example too) that the grid size in the rest of pages (except the last page) is the same as the grid in the first page despite of the extra space in the rest of pages which has been created by removing header.
Note : if you attached an example i prefer it to be written with vb.net not C#. I also attached a sample output.
ARAmal Raj U Syncfusion Team November 23, 2016 02:15 PM UTC
Thanks for the update.
By default, number of records that’s going to print in single page is calculated internally before printing the grid data. Since there is no direct support for hiding the Headers in particular page, managing the margins of page will result in some empty spaces. This cannot be removed directly.
However the space can be avoided by printing some more records of grid by specifying the records to be printed using PrintInfo.m_awPageFirstRow collection which maintains the number of records to be printed in each page. By modifying this collection with our records, we can remove the unwanted spaces. Please make use of the below code,
bool firstPagePrinted = true; int pageIndex = 1; int NoOfRecordsToAdd = 2;
NoOfRecordsToAdd defines the number of records to be added in the remaining empty spaces. The above customization for changing the PrintInfo.m_awPageFirstRow may differs with your Grid’s bounds based on remaining empty spaces. You can customize the PrintInfo.m_awPageFirstRow as per your remaining empty spaces.
If the number of records to be printed in the page exceeds the maximum bounds area, then that page will not printed.
Amal Raj U.
HUHussainNovember 29, 2016 12:06 PM UTC
Thanks. Almost every thing worked fine except this part,
for (int i = pageIndex + 2; i < this.gridGroupingControl1.TableControl.PrintInfo.m_awPageFirstRow.Count; i++)