Hi i'm almost done with my project for our C# ASP.NET class but have just one thing left to do, and that is to print my datagrid view as is, with header included. Now i have absolutely no idea how to do this. I tried some javascript codes etc. but i'm getting nowhere. I'm filling my datagrid with a DataTable (coded myself). Any one have some suggestions?

Thnx in advanced!:-/

Note: I'm using a master page for all my pages!

I'm currently using this piece of code but would really like it to work with a button:

<a href="javascript:window.print()">Print Page(s)</a><br />

Well, got this solution:

http://www.dotnetcurry.com/(X(1)S(gwv3sh45pnz1jaulmmhojcjy))/ShowArticle.aspx?ID=92&AspxAutoDetectCookieSupport=1

Tnx anyway!

Hi..
PLZ check this

<a href="#" onclick="window.print()" style="border: 0;">
<img src="../images/printer-icon.jpg" style="border: 0;" width="83" height="70" alt="" /></a>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.