We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

datagridview printing...

rbirnesser
rbirnesser asked
on
Medium Priority
1,257 Views
Last Modified: 2012-05-05
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.
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008
Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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 ?
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

Commented:
No, I don't have any ideas.

Bob

Author

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.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

Commented:
How did you solve it?

Bob

Author

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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.