Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I...I have a DGV that loads its data from an Excel file. I have set DGV to auto size rows and columns which almost works. I don’t understand why it prefers to use the word wrap on some columns when the whole data doesn’t fill the DGV area. I’m left with a grey blank area to the right of the last column. My Question is, Is there a way to set the maximum length of the auto size columns so that expands a bit more before word wrapping? I have played around with different combinations Auto Size formats such fill, none, all cells etc and tried columns(?).maxlentgh(int32) but as you can guess it didn’t work. If anyone can help I would really appreciate it.
Posted
Updated 12-Jan-16 13:36pm
v2
Comments
Sergey Alexandrovich Kryukov 12-Jan-16 16:37pm    
What are you talking about? What "length"? Column's size is width.
—SA
Member 11492022 14-Jan-16 10:11am    
what just because I put length not width you don't understand the question. I'm look for help, so if you’re just going to be difficult please don't answer.
Sergey Alexandrovich Kryukov 14-Jan-16 10:45am    
This is rude, nothing else.
Who would like to talk to you and help, if you even don't want to clarify your questions?
—SA
Member 11492022 14-Jan-16 11:00am    
And starting your answer by saying What are you talking about isn't.
Member 11492022 14-Jan-16 11:03am    
Anyway I've done it now. Thanks for your patronising comment

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