如何从GridView中打印特定的列 [英] how to print particular column from gridview

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

问题描述

<asp:CommandField SelectImageUrl="~/images/GSelect_1.png"     ShowSelectButton="True" ButtonType="Image" HeaderText="Select">


当我给出打印信息时,我已经在gridview的第一栏中给出了选择按钮,我不想打印除其他列之外的gridview的第一列.我使用javascript.,..


i have given select button in the first column of gridview when i give print i dont want to print first column of gridview except tat other columns shud print .i used javascript.,.

推荐答案

在样式表中添加
In your stylesheet add
@media print {
.noPrint {
    display:none;
}
}



然后在您不想显示在打印版本(例如按钮)中的HTML中添加class ="noprint"(或将noprint类添加到现有的类声明中).

参考:
使用CSS打印内容 [



Then add class=''noprint'' (or add the noprint class to an exsiting class statement) in your HTML that you don''t want to appear in the printed version, such as your button.

Refer:
Print a doument with CSS[^]


这篇关于如何从GridView中打印特定的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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