如何打印Asp.net Gridview。 [英] How to Print a Asp.net Gridview.
本文介绍了如何打印Asp.net Gridview。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的专家,
如何打印Asp.net Gridview。
我还需要打印标题徽标(完整标题)和Gridview。
请帮忙。谢谢你。
Dear Experts,
How to Print a Asp.net Gridview.
I also need to print the Header logo (Complete Header) and also Gridview.
Please help . thank u.
推荐答案
You want to print only Gridview not entire page.
Solution is, put Gridview inside a Panel as below:
<asp: Panel runat="server" id="pnlToPrint" >
<asp:GridView ID="gvReport" runat="server"........>
............
..............
............
</asp:GridView>
</asp: Panel>
<input type="button" value="Print" onclick="CallPrint();" />
Now create a function as below:
function CallPrint()
{
var printContent = document.getElementById('<%= pnlToPrint.ClientID %>');
var printWindow = window.open("", "Print Panel", 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(prtContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
使用分页打印GridView [ ^ ]
打印GridView来自ASp.net [ ^ ]
更改打印页面样式 [ ^ ]
在DotNet Framework上打印DataGridView [ ^ ]
如何打印多个gridviews,每个网格都在不同的页面上。 [ ^ ]
如何从Gridview打印记录 [ ^ ]
在每页上打印gridview标题 [ ^ ]
打印带标题的多页网格视图 [ ^ ]
干杯!
-AP
Printing a GridView with Paging[^]
Printing GridView from ASp.net[^]
Changing Page Style for Printing[^]
Printing a DataGridView on DotNet Framework[^]
How to print multiple gridviews, each grid will be on separate pages.[^]
How to print the Records from Gridview[^]
Print gridview header on each page[^]
Printing multi-page gridviews with headers[^]
Cheers!
-AP
这篇关于如何打印Asp.net Gridview。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文