Look at your source code output and I would hazard a guess that your newline
isn't being rendered as <br>, which in html would create a newline. If I
recall correctly, you can only do this using templatefields, so have a read
of a few tutorials like this one to start:
http://aspnet101.com/aspnet101/tutorials.aspx?id=58
Regards
John Timney (MVP)
http://www.johntimney.com http://www.johntimney.com/blog
"John Doe" <jdoe (AT) msn (DOT) com> wrote
Quote:
I'm binding a Gridview to a DataTable. I want to display the Gridview
cells with multiline values. In populating the data for the DataTable, I
use Environment.Newline but the data doesn't display in Gridview as
multiline:
newRow[myDataColumn.Ordinal] = diff.ToString("N")+ Environment.Newline +
pct.ToString("P"); |