Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to 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 8-Apr-13 20:27pm
Comments
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...
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
v2

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 9 Apr 2013
Copyright © CodeProject, 1999-2014
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