Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,
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
Comments
Sergey Alexandrovich Kryukov 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...
—SA

Hi,

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.
 
Share this answer
 
Hi,

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.
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900