The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi
I am trying to use the grid printing but want to enable the range of pages - is there anyway to get what the page range is from GridPrintDocument? Mine is always saying 0-9999 no matter what grid I try to print.
Thanks,
Corinne
ADAdministrator Syncfusion Team November 23, 2004 05:11 PM UTC
After OnBeginPrint has been called, I think you can get the page count using (might be off by one):
Dim info As GridPrintInfo = Me.GridDataBoundGrid1.PrintInfo
Dim pageCt = info.m_awPageFirstCol.Count * info.m_awPageFirstRow.Count
CMCorinne MuirNovember 23, 2004 05:53 PM UTC
But I need it before onbeginPrint because I want to populate the print dialog with the available range...
ADAdministrator Syncfusion Team November 23, 2004 06:07 PM UTC
The grid does not know the pages before OnBeginPrint. That is where the number of pages is computed.
If you derive the GridProntDocument, you could expose a public method that allows you to call the protected OnBeginPrint method. This may let you compute the page count when you want it.
Or, if you have the source code, you can write a method based on the code in the OnBeginPrint method that directly the number of pages.