473,503 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid behavior

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 R.
E-mail
Dim strAddr As String =Convert.ToString(String.Format("{0}.{2}@{3}.{1}",
"mxrc", "cx", "robitxille", "xrs-solutions")).Replace("x", "a")
Feb 7 '06 #1
2 970
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
"Marc Robitaille" <ma*******@videotron.caa> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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 R.
E-mail
Dim strAddr As String =Convert.ToString(String.Format("{0}.{2}@{3}.{1}",
"mxrc", "cx", "robitxille", "xrs-solutions")).Replace("x", "a")

Feb 7 '06 #2
Thank you, It was so simple :-)

"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> a écrit
dans le message de news: uS**************@tk2msftngp13.phx.gbl...
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
"Marc Robitaille" <ma*******@videotron.caa> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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 R.
E-mail
Dim strAddr As String =Convert.ToString(String.Format("{0}.{2}@{3}.{1}",
"mxrc", "cx", "robitxille", "xrs-solutions")).Replace("x", "a")


Feb 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1580
by: James Lennon | last post by:
I have a WindowsForms.DataGrid that I am using to display a datatable. The datagrid is composed of TextBoxColumns. I would like to make the DataGrid have the following behavior. When a user...
0
1419
by: MrNobody | last post by:
hey guys... I'm trying to make my DataGrid have selection behavior similar to WindowsExplorer, where I can hold CTRL to add rows to a multi-row selection. Thanks to someone else on this...
1
3375
by: MrNobody | last post by:
Is it at all possible to override the default behavior of a DataGrid when the mouse is clicked on a row? I am having a problem where I am trying to select multiple rows in a DataGrid by...
4
3911
by: Paul | last post by:
I sometimes get a timeout error when populating my datagrid, the code is WizardConnection.Open() UpdateCommand.CommandText = "EXECUTE sp_assign_user '" & PhysOffice.SelectedValue & "', '" &...
3
1238
by: simchajoy2000 | last post by:
Hi, I am using a datagrid which contains a dataset with several tables and I am experiencing an inexplicable behavior that I am unable to resolve. Perhaps it's due to the complexity of my...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.