Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
I am using Datagridview and bind data from database, So that i need to print the Datagridview Datas, As Datagridview has 20 columns.i am using some print function but it displayed only 8 columns. so any1 help to print the all columns with different function
Posted 8-Apr-13 20:27pm
Sergey Alexandrovich Kryukov at 9-Apr-13 1:36am
System.Windows.Forms? Tag: "WinForms".

What did you try? There is no such thing as miracle. For printing, reformat it some how, wrap the text. use smaller font, etc...
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


may the height and width of the rectangle area of the datagridview for printing going wrong, that is why, the print document is missing the extra columns.

refer below articles for more on printing the datagridview data.
How to DataGridView Printing[^]
How to print DataGridView in .NET[^]
Print DataGridView In WinForms Windows Forms With C# VB.NET[^]
Print Windows Forms DataGridView [^]

hope it helps.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


If the columns do not get printed correctly even after trying the solutions provided above, try exporting the data to excel file. I prefer doing so, as it allows various other operations to be done on data.

Following link will help you in exporting data to excel.
Export to Excel using VB.Net[^]

Hope you get a good print..

Happy coding.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 455
1 Sergey Alexandrovich Kryukov 445
2 Maciej Los 290
3 ProgramFOX 275
4 CHill60 225
0 OriginalGriff 550
1 Sergey Alexandrovich Kryukov 470
2 Maciej Los 310
3 ProgramFOX 275
4 Peter Leow 250

Advertise | Privacy | Mobile
Web03 | 2.8.150331.1 | Last Updated 9 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100