• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1238
  • Last Modified:

datagridview printing...

I was wondering if anyone had ne luck printing datagridviews with multiple pages, and allowing column span to other pages using vb .net 2.0 windows forms? how would i go about accomplishing this i am new to the GDI + stuff.
0
rbirnesser
Asked:
rbirnesser
  • 3
  • 3
1 Solution
 
Bob LearnedCommented:
Private Sub mnuPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPrint.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(dgv, myPaintArgs)
    End Sub

Bob
0
 
rbirnesserAuthor Commented:
I tried that it prints the grid lines ok the but the text is micro.  I was also looking for a solution that you can use print preview with? any ideas also in the code above what object does the printdocument1 document property need to be set to ?
0
 
Bob LearnedCommented:
No, I don't have any ideas.

Bob
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rbirnesserAuthor Commented:
I solved this issue myself, but i still accepted your answer because it works and you are the only one who has given effort.
0
 
Bob LearnedCommented:
How did you solve it?

Bob
0
 
rbirnesserAuthor Commented:
Using a plugin called DataGridView Columns 2.0 by a company called rustemsoft perfect solution for what i need and it was only 60 bucks and has alot of other things included also.  www.rustemsoft.com
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now