Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have one problem that I want to print all the data inside the datagridview ,just print the whole data kindly tell me how to print whole data.
Posted

1 solution

My best advice would be: print data, not controls. The concepts of those on-screen control are very different from what you need on paper. Screen views are fluid, paper image has to be fixed; controls allow user input, but clicking in a check box printed on paper will look pretty stupid. List boxes can show its drop-content on screen, but will show only one item on paper. And so on.

If you want to listen to this advice, print data. Use the class System.Drawing.Printing.PrintDocument:
https://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument%28v=vs.110%29.aspx[^].

Don't want to listen to a reasonable advice, see, for example, http://www.codeproject.com/search.aspx?q=Print+DataGridView&doctypeid=1%3b2%3b3%3b13%3b14%3b5[^].

Good luck,
—SA
 
Share this answer
 
v2

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