使用Extra Receipt Asp.Net等额外信息打印Gridview数据 [英] Print Gridview data with Extra Info Like Receipt Asp.Net
本文介绍了使用Extra Receipt Asp.Net等额外信息打印Gridview数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用额外信息打印Gridview数据,如收据Asp.Net
我正在使用打印代码< br $> b $ b
Hi,
I am trying to Print Gridview data with Extra Info Like Receipt Asp.Net
I am using Print code
grdReport.RenderControl(hw);
构建字符串数据并使用js打印。
打印工作正常,但我无法在顶部添加公司名称和底部地址等额外详细信息。
在c#Asp .Net
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
推荐答案
Thnx @ Christian Graus
用javascript完成隐藏的div
并通过取消隐藏它打印然后保持隐藏
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();
我不明白为什么你需要''打印代码''。您只需要一个窗口,准确显示您要打印的内容,并在javascript中调用window.print。您可以添加所需的任何信息,它将全部打印。
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.
这篇关于使用Extra Receipt Asp.Net等额外信息打印Gridview数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文