Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
675
Page number does not work when Printing form a grid
posted

Hi,

I use the UltraGridPrintDocument to Print the content of a grid.

Everything works find except the PageNumber. The page number is always 1 on every page

Also it is possible to have for the page number something like 1/3, 2/3, 3/3

This my code is there something wrong?

Thanks in advance

Dim frm As New PrintDialog

Dim doc As New UltraGridPrintDocument

doc.Grid = Me.m_grid

doc.DefaultPageSettings.Landscape = True

doc.FitWidthToPages = 1

doc.Header.TextLeft = "My header "

doc.Header.TextRight = "Date d'impression : " & Today.ToShortDateString

doc.Footer.TextRight = doc.PageNumber

frm.Document = doc

If frm.ShowDialog() = Windows.Forms.DialogResult.OK Then

doc.Print()

End If

Parents
No Data
Reply Children
No Data