Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

Why does the cell text show up with "square" characters where they should be new lines?

By default, text in a DataGridViewTextBoxCell does not wrap. This can be controlled via the WrapMode property on the cell style (e.g. DataGridView.DefaultCellStyle.WrapMode). Because text doesn't wrap, new line characters in the text do not apply and so they are displayed as a "non-printable" character. This is similar to setting a TextBox's Text property to the same text when the TextBox's MultiLine property is false.



Page view counter