In beta1, datagridview cells could contain display multiline data by default. In beta2, the data is shown on a single line with some control characters.
(1) Can I set the cells to display multiline
(2) Can I replace the control characters with something else (eg a double space) to make it look a little more professional
Thanks

multiline datagridview cells?
MrMojoRisin
You probably need to set your AutoSizeRowsMode property on the column in question... to AllCells, for example.
-Andrew
Krivahn
Hope this helps,
-mark
Program Manager
Microsoft
This post is provided "as-is"
JoeSox
Ok, I have given up on the multline cells mainly due to the large performance hit when using autoresize rows and columns and wrapmode=true.
Instead, I would like to use a single line, but replace any crlf with a space. Alternatively, have just the first line followed by ...
Is there a simple way to do this
(The datagridview is readonly)
Thanks
sqltechlead
Regarding auto size behavior. The DataGridView code attempts to create a good offset of width to height but it does not do what you request (about displaying all on one line or multiple lines only when there is a CRLF).
You can plug in your own calculations for autosize by inheriting from DataGridViewCell::GetPreferredSize().
Hope this helps!
-mark
Program Manager
Microsoft
This post is provided "as-is"
alpha1105omega
-mark
Program Manager
Microsoft
This post is provided "as-is"
George Jackson
thanks,
-mark
Program Manager
Microsoft
This post is provided "as-is"
VB.IS.NOT.PYTHON
Yes - Derive from the DataGridViewTextBoxCell class and override the GetPreferredSize method. You will also need to override the Paint method to paint your text using different TextRenderer flags.
You can manually add your custom cell to a row via the Row.Cells collection:
DataGridViewRow myDataGridViewRow = new DataGridViewRow();
myDataGridViewRow.Cells.Add(mycustomTextboxCell);
You can also create a custom column type so you can get design time support. See this post for an example of a custom column:http://www.windowsforms.net/Forums/ShowPost.aspx tabIndex=1&tabId=41&PostID=15227
-mark
Program Manager
Microsoft
This post is provided "as-is"
SuperRock
Does that mean that I create a derived datagridviewcell and ovverride the getpreferredsize method
Do I then have to use the dervied datagridviewcell instead of the original one and if so, how do I go about this
Thanks
Scott Myers
When combined with autosized row heights and column widths, the results are not what I desire. I want to have the columns resize to accomodate the widest single line for that column, and the row height to resize to accomodate the maximum number of lines in that row. Is this possible
In other words, I only want to display text on a new line if there is a CRLF in the text. Otherwise, I want the column to resize to the width (or add ...).
I believe this was possible in previous releases, but cannot see how to do it now.
Thanks
cool-net
Alec Cozens
Mike Duke
guiticom1304
ErikG
Now, is there a way to autosize the row heights to the maximum size of cell content
For example, 3 cells are single-line, 1 cell is double-line, so set row height OF THAT row to accommodate the double-line data. (and repeat for each row, so each row has a different height - similar to the column autosizing)