Hi all, please help. I am noob to .net programming and can´t solve the problem of datagrid print.
I use this simple code to print the datagrid control but do not know how to print more then one page. I have tried to set the property HasMorePages = true based on height od the grid but all I have achieved was to print the first page multiple times.
Could you please advise or send hyperlink where I can find something helpful ?
Private Sub PrintGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tisk_button.Click
printdocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printdocument1.PrintPage
Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New Point(0, 0), Me.Size))
Me.InvokePaint(datagrid, myPaintArgs)
End Sub
I use this simple code to print the datagrid control but do not know how to print more then one page. I have tried to set the property HasMorePages = true based on height od the grid but all I have achieved was to print the first page multiple times.
Could you please advise or send hyperlink where I can find something helpful ?
Private Sub PrintGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tisk_button.Click
printdocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printdocument1.PrintPage
Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New Point(0, 0), Me.Size))
Me.InvokePaint(datagrid, myPaintArgs)
End Sub