Hi all,
could please help? I am very newbie to .net programming and can´t solve the problem of datagrid control 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 ?
If there is any way how to print directly from dataSet I would appreciate any your help.
Thanks a lot
PrivateSub PrintGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tisk_button.Click
printdocument1.Print()
EndSub
PrivateSub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printdocument1.PrintPage
Dim myPaintArgs AsNew PaintEventArgs(e.Graphics, New Rectangle(New Point(0, 0), Me.Size))
Me.InvokePaint(datagrid, myPaintArgs)
EndSub
could please help? I am very newbie to .net programming and can´t solve the problem of datagrid control 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 ?
If there is any way how to print directly from dataSet I would appreciate any your help.
Thanks a lot
PrivateSub PrintGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tisk_button.Click
printdocument1.Print()
EndSub
PrivateSub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printdocument1.PrintPage
Dim myPaintArgs AsNew PaintEventArgs(e.Graphics, New Rectangle(New Point(0, 0), Me.Size))
Me.InvokePaint(datagrid, myPaintArgs)
EndSub