Skip to content

ForcePagination Property

Description

Specifies whether to force the grid to be split up into "pages" while in print preview mode. This also affects the page count that is displayed when the printer dialog is shown, for example, printing pages 1-*.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property ForcePagination() As Boolean

Remarks

ForcePagination is for those who choose not to use non-continuous print mode (ForcePagination = False). By default, print preview does not know how many pages the grid has; therefore, it can't be viewed in "pages" in print preview. This is because it is in continuous print mode. The print preview dialog will only get confused if you click "next page" because, to the printer and the preview window, it is just looking at one large page. For example, if you have a grid that would take 10 pages of paper to print, the printer and preview window still see that as one continuous page. In this case, if you print, the printer dialog will say something like "Printing Pages 1/*" or something similar.

Now consider the case where you want to know exactly what each page will look like in print preview, the number of pages, and have the preview window show the preparation for a proper print. In this case, you want ForcePagination to be True. The benefits of this are:

  • You can view each page in print preview.
  • You know how many pages will be required.
  • You can print a range of pages (i.e., pages 3-8), and the printer dialog will tell you which page is currently printing with a message like "Printing Pages 8/20".
  • You can include header and footer information if you use them.

However, there is a cost to getting all this information. Non-continuous mode (ForcePagination = True) will take time to "paginate" the document. If it is a small grid, this cost is minimal. If it is a large grid, the cost can be quite high. The only time you would want continuous mode (ForcePagination = False) is when speed becomes a factor in really large grids.

See Also

TrackControl Control


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.