如何在windows应用程序中打印datagridview整个内容 [英] How to print the datagridview whole content in windows application

查看:73
本文介绍了如何在windows应用程序中打印datagridview整个内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我想打印datagridview中的所有数据,只需打印整个数据就告诉我如何打印整个数据。

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.

推荐答案

我最好的建议是:打印数据,而不是控件。屏幕控制的概念与您在纸上的需求有很大不同。屏幕视图流畅,纸张图像必须固定;控件允许用户输入,但点击打印在纸上的复选框看起来很愚蠢。列表框可以在屏幕上显示其内容,但在纸上只显示一个项目。等等。



如果你想听听这个建议,打印数据。使用类 System.Drawing.Printing.PrintDocument

https://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument%28v=vs。 110%29.aspx [ ^ ]。



不想听听合理的建议,例如, http://www.codeproject.com/ search.aspx?q = Print + DataGridView& doctypeid = 1%3b2%3b3%3b13%3b14%3b5 [ ^ ]。



祝你好运,

-SA
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


这篇关于如何在windows应用程序中打印datagridview整个内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆