如何打印具有水平滚动条的网格数据 [英] How to print the grid data which has horzontal scrollbar

查看:181
本文介绍了如何打印具有水平滚动条的网格数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试打印一个列数为n的可滚动网格视图.我的aspx页面上有一个打印按钮.假设这些列的"n"个数不能在单页中打印,因此我需要在两页或更多页中打印.请使用代码帮助我.


问候,
Premkumar Duraiswamy.

Hi,

I am trying to print a scrollable gridview which has ‘n’ number of columns. I have a print button on my aspx page. assume tat these ''n'' no of columns cant be printed in a single page so i need to print in two or more pages. pls kindly help me with the code.


With regards,
Premkumar Duraiswamy.

推荐答案

打印数据,而不是控件内容.使用以数据为中心的方法.无论是否基于数据绑定,您都应该具有一些用于填充网格的数据源.

不管屏幕上显示的数据如何,都使用相同的数据源进行打印.使用类System.Drawing.Printing.PrintDocument,请在此处查看文档和代码示例: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx [
Print data, not the control content. Use data-centric approach. You should have some data source used to populate the grid, based on data binding or not.

Use the same data source for printing, regardless of data presentation on screen. Use the class System.Drawing.Printing.PrintDocument, see documentation and code sample here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^].

—SA


这篇关于如何打印具有水平滚动条的网格数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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