从网格视图隐藏列 [英] hiding columns from grid view

查看:59
本文介绍了从网格视图隐藏列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想打印一个网格视图,这个网格视图包含自动生成的编辑和删除按钮

我想在打印时隐藏这些按钮

解决方案

你可以打开一个弹出窗口,传递参数作为用于填充gridview的查询字符串,显示那里的数据和页面加载时触发javascript'的window.print方法。你也可以在打印内容时关闭窗口。这样你就可以优雅地管理页面的外观。


< blockquote>您可以使用不同的CSS样式进行打印,其中为编辑 - 删除按钮列定义的CSS类会发生变化。



因此,列的CSS类将在普通样式表和打印样式表中有所区别。这种差异的显示属性为''block''和''none''。


hi,

I want to print a grid view this grid view contains auto generated "EDIT AND DELETE BUTTONS
I want to hide these buttons at the time of printing

解决方案

You can open a popup, pass parameters as querystring that you used to populate gridview, display data there and firing javascript''s window.print method on page load. You can also close the window when the content is printed. This way you can manage the appearance of your page much gracefully.


You can have a different CSS style for printing where the CSS class defined for the edit-delete button columns would change.

Thus, CSS class for the columns would differ in normal stylesheet and the print stylesheet. This difference would have display property as ''block'' & ''none''.


这篇关于从网格视图隐藏列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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