Datagrid displaying Line feeds? (and layout question)

  • Thread starter Thread starter Grant Mills
  • Start date Start date
G

Grant Mills

Is there anyway to get a datagrid to display line feeds?



I have a bunch of data stored in the database, and needs to have the
formatting stay the same as when it was put in. Everything is HTMLencoded in
the database. However, when displayed by ASP.net, it does everything BUT the
line feeds. :|





Also, Can I have the datagrid display information in alternating rows,
instead of 2 columns? As in if an Excel spread sheet went



A1

B1

A2

B2



instead of

A1 B1

A2 B2



Thanks for your help.





Grant
 
When binding data to the display, replace line feeds with <br> tags (I
assume you don't bind it to TextBox etc)

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

Is there anyway to get a datagrid to display line feeds?



I have a bunch of data stored in the database, and needs to have the
formatting stay the same as when it was put in. Everything is HTMLencoded in
the database. However, when displayed by ASP.net, it does everything BUT the
line feeds. :|





Also, Can I have the datagrid display information in alternating rows,
instead of 2 columns? As in if an Excel spread sheet went



A1

B1

A2

B2



instead of

A1 B1

A2 B2



Thanks for your help.





Grant
 
Back
Top