Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<asp:CommandField SelectImageUrl="~/images/GSelect_1.png"     ShowSelectButton="True" ButtonType="Image" HeaderText="Select">

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.,.
Posted
Updated 26-Jul-12 2:23am
v2

1 solution

In your stylesheet add
CSS
@media print {
.noPrint {
    display:none;
}
}


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[^]
 
Share this answer
 
Comments
Umapathi K 26-Jul-12 8:23am    
i cant get clear idea., in the css how to mention particularly button
Raghunatha_Reddy_S 26-Jul-12 8:26am    
Refer http://haacked.com/archive/2006/03/13/CSSBasedPrintingTip.aspx
Umapathi K 27-Jul-12 0:13am    
when the form run its getting hide but when i give print that column also getting print.,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900