Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using following coding for print datagridview datas
VB
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        Dim bm As New Bitmap(Me.dgview.Width, Me.dgview.Height)
        dgview.DrawToBitmap(bm, New Rectangle(0, 0, Me.dgview.Width, Me.dgview.Rows.Count))
        e.Graphics.DrawImage(bm, 0, 0)
      

    End Sub

My gridview is displays with scroll bars.
This is print only displaying records
I want to print all the records in datagridview. How to do it. Please help me

thank you
Posted
Updated 8-Apr-12 22:21pm
v2

go with this link

Printing of DataGridView[^]



Happy coding :)
 
Share this answer
 
Comments
VJ Reddy 9-Apr-12 4:15am    
Good link. +5
 
Share this answer
 
Comments
VJ Reddy 9-Apr-12 4:16am    
Helpful links. +5
You can take a look at the DataGridViewExtension which has got printing, exporting and several other features extending the standard DataGridView as given here
http://www.completit.com/Portfolio/DGVE/Features.aspx[^]
A free version of the component is also available, as given here
http://www.completit.com/Portfolio/DGVE/Overview.aspx[^]
I think the above link may be helpful to you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900