Click here to Skip to main content
13,288,520 members (65,144 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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
Posted 4-Jan-13 4:59am
joshrduncan2012 4-Jan-13 10:14am
What is your question exactly? What have you tried as far as accomplishing this?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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'.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171207.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100