Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NET
Hi,
I am trying to Print Gridview data with Extra Info Like Receipt Asp.Net
 
I am using Print code
 
grdReport.RenderControl(hw);
 
building string data and using js to print.
 
Print is working fine but i am unable to add extra details like company name on top and address at bottom.
 
In c# Asp .Net
Posted 8-Jan-13 6:21am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I don't understand why you need 'print code'. You just need a window that shows exactly what you want to print and calls window.print in javascript. You can add any info you want, it will all print.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thnx @ Christian Graus
 
completed with javascript kept a hidden div
 
and printed by unhiding it and then kept it hidden
 
new_window.document.write(header.outerHTML);
               new_window.document.write(grd_obj.outerHTML);
               new_window.document.close();
               new_window.print();
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 755
1 OriginalGriff 503
2 Abhinav S 253
3 thatraja 245
4 Emre Ataseven 190
0 Sergey Alexandrovich Kryukov 8,282
1 OriginalGriff 4,750
2 Peter Leow 3,784
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid