Datagridview column - wrap long text.

Posted on 2006-06-04
Medium Priority
Last Modified: 2012-06-27
I have set the datagridview property as follow:

            dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;

but there is one particular column where the length of string is long and
i would like to fixed the width of this column and let the text wrap to the next line.

Any suggestion on how this can be done?
Question by:michellechan57
  • 2
LVL 26

Accepted Solution

Umesh earned 1500 total points
ID: 16832241
Try this..

Make sure that the column of the DataGrid has the ItemStyle Wrap property explicitly set to True

<ItemStyle Wrap="True"></ItemStyle>

Author Comment

ID: 16832669
I am using DataGridView and window form application.
There is no ItemStyle Wrap property for DataGridView.

Author Comment

ID: 16849853
Seems tougher than I thought.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question