如何在vb.net中打印datagridview结果? [英] How to print the datagridview results in vb.net?

查看:258
本文介绍了如何在vb.net中打印datagridview结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格上的datagridview和它下面的打印按钮...我想要,当我点击打印按钮打印对话框应该出现,并且datagrid结果应该打印...怎么办?任何人都可以告诉我?

解决方案

 < a href =JavaScript: print();>打印此页< / a> 

您可能还需要使用单独的样式表进行调查,使用 media 属性。这将提供更好的打印结果。


I have a datagridview on a form and a print button below it...i want that when i click the print button the print dialog should appear and the datagrid results should be printed...How can it be done??Can anyone tell me??

解决方案

<a href="JavaScript:window.print();">Print this page</a>

You might also want to investigate using separate stylesheets for printing and screen by using the media attribute. This will provide better printing results.

这篇关于如何在vb.net中打印datagridview结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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