Datagrid behavior

  • Thread starter Thread starter Marc Robitaille
  • Start date Start date
M

Marc Robitaille

Hello,

I have DataGrid that I filled using a DataSet.
DataGrid1.DataSource = ds
DataGrid1.DataBind()

In this grid, I have a column of the Text type. When I insert the data, I
can have value that look like this in a multiline textbox:
1
2

3
4

But when the grid is filled with the DataSet, the grid contains:
1 2 3 4

I checked the value of my column in my row of my table right before the
assignment of the DataSource property of my grid and the information is
good. But once in the grid, it removes all the return character from the
string.

How to make so that the grid respects the formatting of my text?

thank you
 
Marc,

The textbox is translating the line returns into VbCrlf characters but on
the web VbCrlfs aren't rendered so they show up as spaces. Replace the
VbCrlfs with a html break <br />.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
Thank you, It was so simple :-)

S. Justin Gengo said:
Marc,

The textbox is translating the line returns into VbCrlf characters but on
the web VbCrlfs aren't rendered so they show up as spaces. Replace the
VbCrlfs with a html break <br />.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
Back
Top