Click here to Skip to main content
11,495,319 members (68,057 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET

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 at 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
0 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 275
3 Sergey Alexandrovich Kryukov 255
4 Nakul Chaudhari 236
0 Sergey Alexandrovich Kryukov 10,307
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,889
3 Maciej Los 3,412
4 Richard Deeming 2,560

Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2015
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