We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Print Dialog Range

Thread ID:





21811 Nov 23,2004 10:58 AM Nov 23,2004 01:07 PM Windows Forms 3
Tags: GridControl
Corinne Muir
Asked On November 23, 2004 10:58 AM

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

Administrator [Syncfusion]
Replied On November 23, 2004 12:11 PM

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

Corinne Muir
Replied On November 23, 2004 12:53 PM

But I need it before onbeginPrint because I want to populate the print dialog with the available range...

Administrator [Syncfusion]
Replied On November 23, 2004 01:07 PM

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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.