How to print data from datagrieview?

asureshkumarmca

New member
Joined
Nov 6, 2013
Messages
1
Programming Experience
5-10
Hi All,

Could you please help me to print the data from datagriew view by without using graphics option?
 
If you mean without using a PrintDocument then you basically can't. You can use a PrintForm component and let it handle the GDI+ for you but that has a number of limitations. The way to do any WinForms printing is to use a PrintDocument and handle its PrintPage event, using GDI+ to draw whatever you want printed. Fortunately, someone better at printing than you or me has already done the heavy lifting for you.

DataGridPrinter - A class to print data grid in a nicely formatted way

That thread was originally for printing a DataGrid but the DataGridView version of the class is provided later.
 
Back
Top