Datagrid behavior

  • Thread starter Marc Robitaille
  • 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
 
S

S. Justin Gengo [MCP]

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
 
M

Marc Robitaille

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top