开发者

Best way to print a datagridview with all rows and all columns? [duplicate]

开发者 https://www.devze.com 2023-02-18 21:28 出处:网络
This question already has answers here: Printing a .NET DataGridView (9 answers) 开发者_JAVA技巧Closed 8 years ago.
This question already has answers here: Printing a .NET DataGridView (9 answers) 开发者_JAVA技巧Closed 8 years ago.

I need to add some functionality to be able to print whatever is displayed in datagridview. I tried to use bitmap class but it does not seem to be printing all the rows and columns. It looks like a screenshot and missing some columns and rows. Anybody knows any better way to handle this? Thanks so much.


There are some examples/utilities on CodeProject:

  • http://www.codeproject.com/KB/printing/PrintingOfDataGridView.aspx

  • http://www.codeproject.com/KB/printing/GridPrintPreviewSolution.aspx
    http://www.codeproject.com/KB/printing/GridPrintPreviewSolution2.aspx

  • http://www.codeproject.com/KB/printing/DGVPrinter.aspx


Check this link :

How To Print a Data Grid in C# and .NET

And Have you tried creating local report (rdlc and using Reportviewer)?

This will also help you to create custom reports..

Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号