打印 .NET DataGridView [英] Printing a .NET DataGridView

查看:25
本文介绍了打印 .NET DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 .NET 和 C# 还很陌生,但我有一个想要打印的 DataGridView.这样做的最佳方法是什么?

I am fairly new to .NET and C#, but I have a DataGridView that I would like to print. What would be the best way to go about doing so?

推荐答案

您可以将 DataGridView 导出到 Excel,然后从 Excel 中打印出来.

You could export the DataGridView to Excel and then print it from Excel.

您还可以考虑不在 DataGridView 中显示您的数据,而是将其显示在 ReportViewer 控件中,该控件可以导出为 PDF 或 Excel.从那里可以打印您的数据.

You could also consider to not show your data in a DataGridView, but show it in a ReportViewer control, which has the ability to export to PDF or Excel. From there it's possible to print your data.

这篇关于打印 .NET DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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