Line feeds in a GridView

  • Thread starter Thread starter MSNews
  • Start date Start date
M

MSNews

Hi,

If a database field contains more than one line of text, i.e. Several
Environment.NewLine characters, the GridView cell ignores them. If I replace
the NewLine with "<br />" - the GridView helpfully converts that string to
"&lt;br %gt;" and so I don't get the CrLf - arrgh! this used to be easy, am
I missing a simple trick?

The colums are autogenerated, which works perfectly except for this problem.

Can anyone help?

TIA
 
OK,

I finally managed to dig down through the smart-tag to find the HtmlEncode
property of the BoundField and set it to false. so, by replacing NewLine
with "<br />" in the database, it all works.
 
Back
Top