TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Joseph Eldho
NA
187
10.3k
Print Row data in Gridview Asp.net C#
Aug 11 2017 1:19 AM
//head
<script type="text/javascript">
function RPrint()
{
var prtContent = document.getElementById('<%= PORPT.ClientID %>');
prtContent.border = 0; //set no border here
var WinPrint = window.open('','','left=100,top=100,width=1000,height=1000,toolbar=0,scrollbars=1,status=0,resizable=1');
WinPrint.document.write(prtContent.outerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
//in body (gridview id =
PORPT
)
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<a href="javascript:;" onclick="RPrint(this)">
<asp:Button ID="ButPrint" runat="server" Text="Print" BackColor="#009900" ForeColor="White"
Height="26px" Width="52px" /></a>
</ItemTemplate>
</asp:TemplateField>
Attachment:
grid.rar
Reply
Answers (
2
)
How to achieve Remote validation from Fluent validation mvc5
Practice in learning in php