print data grid view
-
venerdì 23 marzo 2012 19:07
hi i have data grid view in vb 2008 i need to print it without use report ???
can i do ???? how ???
Tutte le risposte
-
lunedì 26 marzo 2012 03:56Moderatore
Hi Mustafa_it,
Welcome to the MSDN forum.
How to print the data of datagridview is a FAQ. And you can find lots of information in MSDN forum.
In general, there are two solutions:
1. Using the print the function or class provide by .Net.
You can print out the form with your datagridview using Print Form powerpack: http://social.msdn.microsoft.com/forums/en-US/vbpowerpacks/thread/ee619ae3-a437-46b6-9045-b2848e40e20a/
If you want to print the contents in datagridview, the printdocuments class can be the one you are looking for: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
2. Another solution is exporting the data into EXCEL or Word, and use the print function form Office, here is also a sample: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/388f5779-3f4c-4b49-940c-e02e2eb62af2
By the way, here also some project samples for printing datagridview.
Printing a DataGridView on DotNet Framework: http://www.codeproject.com/Articles/25638/Printing-a-DataGridView-on-DotNet-Framework
Another DataGridView Printer: http://www.codeproject.com/Articles/18042/Another-DataGridView-Printer
Hope this helps.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us
- Contrassegnato come risposta Mark Liu-lxfModerator martedì 3 aprile 2012 06:30
-
martedì 3 aprile 2012 06:31Moderatore
Hi Mustafa_it,
We haven’t heard from you for several days. I’d like to mark my reply as answer firstly. If you have any additional questions, you also can unmark the replay and post your question here.
Sorry for any inconvenience and have a nice day.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us

