打印网格视图、数据网格或数据表 [英] print gridviews, datagrids, or datatables

查看:78
本文介绍了打印网格视图、数据网格或数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种在网络应用程序中实施的解决方案,我可以选择在其中查看打印预览或打印 gridview、datagrid 或 datatable,或将其导出到 word 或 excel.这样做的最佳方法是什么,或者有人编写了一个这样做的类,并且做得很好(我看过很多例子,但很多例子仍然有错误)?

I'm looking for a solution to implement in web apps where I have the option to see a print preview or print either a gridview, datagrid, or datatable or export it to word or excel. What's the best method to do this or has someone written a class that does this, and does it well (I've seen many examples, but many still have errors)?

推荐答案

也许您可以考虑将您的 DataTable 转换为 HTML 中的 Table,然后使用设置媒体类型的资源为打印作业设置格式.这个回复背后的想法是这个链接:

Perhaps you could look into converting your DataTable's to Table's in HTML then using the resources for setting up Media types to format it for a print job. Thought behind this response would be this link:

http://www.dreamincode.net/forums/topic/17049-printing-in-html/

这篇关于打印网格视图、数据网格或数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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