Hi
try this example:
<blockquote class="FQ"><div class="FQA">Quote:</div><script type=’text/javascript">
function printform()
{
var printContent = document.getElementById(’<%= pnlForm.ClientID %>’);
var windowUrl = ‘about:blank’;
var uniqueName = new Date();
var windowName = ‘Print’ + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, ‘left=50000,top=50000,width=0,height=0′);
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
</script>
<asp: Panel runat=’server’ id=’pnlForm’ >
<asp:GridView is=’grd1′…[gridview, datasource markup goes here]
</asp: Panel>
<input type=’button’ value=’print’ önclick=’printform();’ /></blockquote>
Hope this helps
Best Regards,