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
0 OriginalGriff 400
1 Gihan Liyanage 238
2 Sergey Alexandrovich Kryukov 150
3 ChauhanAjay 120
4 syed shanu 110
0 Sergey Alexandrovich Kryukov 9,021
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
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