Question How to print Gridview

PatelNehal4u

Active member
Joined
Apr 6, 2009
Messages
25
Programming Experience
1-3
Hello Everyone.

I had created a form which display all the record of Employees in a DataGridView control, now i want to print that gridview as it looks on form. I mean if i put any column in ascending or descending order that it should be applied on printing form. I don't want to create any report, i just want to print that gridview on the fly by showing the user printprivew. I researched a lot but all code is very complicate to understand. Please someone help?
 
Please note that a DataGridView and a GridView are not the same thing. The DataGridView is a WinForms control and the GridView is an ASP.NET control. Please be careful to use the correct names for things to avoid confusion.

As for the question, check [ame="http://www.vbforums.com/showthread.php?t=356115"]this[/ame] out.
 
Thanks Mr. jmcilhinney

Thanks for answering me and telling me the difference between both but i already know about this. And my question is correct. I post this question in Window Form Section and that's why my question is also related to Window Form. I am using DataGridView in my Windows Application and i want to print the data of it.
 
I think jmc's point was that you gave the thread a title of "Question How to print Gridview" instead of "Question How to print DataGridview".

If the first link doesnt give you enough functionality, try looking here
 
Both jmcilhinney and I posted links to code that prints DataGridViews. Whilst I cant comment on jmcilhinney's link, I know the second one works because I use it every single day.

Have you visited the links? Have you tried the code? What problem(s) did you experience?
 
Back
Top