Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Printing the grid
posted

Hi,

I am using the infragistic utrawebgrid.I want to print it .if i use the simple window.print function then it is printing good.

But my requirement is to show the grid in a new window and then print.For this i am using the javascript function as below 

function CallPrintGrid(divGrid)
{
 var prtContent = document.getElementById(divGrid);
 var WinPrint =  window.open('','','letf=0,top=0,width=800px,height=400px,toolbar=0,scrollbars=0,sta­tus=0');
 WinPrint.document.write(prtContent.innerHTML); 
 WinPrint.document.close();
 WinPrint.focus();
 WinPrint.print();
 WinPrint.close(); 

The problem is i am not able to get the grid border lines while printing.I have set the displaylayout.readonly property to PrintingFriendly.

Plz help its argent

Thanks & Regards

Gitanjali

Parents Reply Children
  • 28464
    posted in reply to Abhi

    Hello Abhi,

    You can always search our forums for solutions, I just run a search on "printing" and found two very helpful articles

    1)  Print Preview option in UltraWebGrid

    http://forums.infragistics.com/forums/p/9775/40811.aspx#40811

    2) Print

    http://forums.infragistics.com/forums/p/5705/25227.aspx#25227 

    3) Print Stylesheets and Ultrawebgrid

    http://forums.infragistics.com/forums/p/3249/17797.aspx#17797 

    There are plenty of suggestions and ideas there. I personally would recommend export to print friendly media first (PDF) and then printing (suggestion with code in the second link), but any other approach is fine as well.