Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi frds,
In my datagridview contain 15 columns, i want take print this 15 columns in single page. How can i do this. Any one help me.
Thank You
Posted
Comments
Suvendu Shekhar Giri 15-Dec-15 2:44am    
Print area depends on the page you are printing on.
Decrease the font, adjust the column width and try changing the page orientation to landscape and see if it helps :)
Animesh Datta 15-Dec-15 2:46am    
What have you tried ? where is your problem ?
Mekalamani 15-Dec-15 2:47am    
I want automatically adjust column width and font size based on the data
Mekalamani 15-Dec-15 2:52am    
Yes, I tried but i print only 11 columns per page. i want to print all the columns
Mekalamani 15-Dec-15 2:53am    
http://www.codeproject.com/Articles/28046/Printing-of-DataGridView

I tried like this

1 solution

Use the PrintDocument class[^] - the link includes a basic example - and you can specify exactly where and how big you print everything. It may seem like a lot of work, but it's the best way to print anything in .NET
 
Share this answer
 

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