print command in gridview

Posted by Shitalr under ASP.NET on 9/13/2013 | Points: 10 | Views : 1917 | Status : [Member] | Replies : 2
i have to print multiple certificate.
there is a gridview and no of persons name are in the gridview,
user will check the checkbox and that perticular persons info will be printed,if that user checked multiple checkbox then multiple certificate will be printed.
how can i do this




Responses

Posted by: Bandi on: 9/13/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
refer this
http://forums.codeguru.com/showthread.php?528077-Gridview-Print-the-Details-of-Selected-Checkboxes-in-Popup-Window&p=2087089
This link will pops up the details of checked row inside a gridview
http://www.ezzylearning.com/tutorial.aspx?tid=2861497

for multiple rows print
http://bytes.com/topic/asp-net/answers/861073-print-multiple-files-continuously

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Shitalr, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 9/13/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
To print gridview used javascript is :
function CallPrint() {

var prtContent = document.getElementById("divPrint");

var WinPrint = window.open('', 'prtContent ', 'left=100,top=100,width=100,height=100,tollbar=0,scrollbars=1,status=0,resizable=1');
datagridview.Columns[0].Visible = false;
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}



I would suggest you consider the following approach for printing multiple certificates:

1. One the original page (with Gridview), provide checkbox to let user choose the rows to print

2. When the user click a print button, the page will postback, and you can find all the selected rows(by looping the gridview to check checkbox
values) and redirect the user to a new page which will only display those selected rows.

3. thus, on the new page the user can print what they exactly want. Just an idea of generate a print version. How do you think?


Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Shitalr, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response