473,378 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Easy - Datagrid displaying a comma

Hello -

I didn't exactly know what to put in the Subject line, but here's my problem.

I have the following in my html. I would like to put a comma in after the
city. I tried just putting it in between the %> and </td>, but the comma
displays with an extra space before it., e.g. "someCity ,"

I want "someCity,"

<tr><td width=50%><%#Container.DataItem("City")%></td>

Any help will be greatly appreciated!

--
Sandy
Nov 19 '05 #1
3 982
Jim
Any chance the data being bound from Container.DataItem("City") has a space?

Try something like this
<%#Container.DataItem("City").Trim()%>,</
Jim

"Sandy" wrote:
Hello -

I didn't exactly know what to put in the Subject line, but here's my problem.

I have the following in my html. I would like to put a comma in after the
city. I tried just putting it in between the %> and </td>, but the comma
displays with an extra space before it., e.g. "someCity ,"

I want "someCity,"

<tr><td width=50%><%#Container.DataItem("City")%></td>

Any help will be greatly appreciated!

--
Sandy

Nov 19 '05 #2
Jim
Any chance the data from Container.DataItem("City") has the space in it?

Try this
<%#Container.DataItem("City").Trim()%>,</
Jim

"Sandy" wrote:
Hello -

I didn't exactly know what to put in the Subject line, but here's my problem.

I have the following in my html. I would like to put a comma in after the
city. I tried just putting it in between the %> and </td>, but the comma
displays with an extra space before it., e.g. "someCity ,"

I want "someCity,"

<tr><td width=50%><%#Container.DataItem("City")%></td>

Any help will be greatly appreciated!

--
Sandy

Nov 19 '05 #3
Jim -

Thank you very much!! That was the problem!
--
Sandy
"Jim" wrote:
Any chance the data being bound from Container.DataItem("City") has a space?

Try something like this
<%#Container.DataItem("City").Trim()%>,</


Jim

"Sandy" wrote:
Hello -

I didn't exactly know what to put in the Subject line, but here's my problem.

I have the following in my html. I would like to put a comma in after the
city. I tried just putting it in between the %> and </td>, but the comma
displays with an extra space before it., e.g. "someCity ,"

I want "someCity,"

<tr><td width=50%><%#Container.DataItem("City")%></td>

Any help will be greatly appreciated!

--
Sandy

Nov 19 '05 #4

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

Similar topics

6
by: JW | last post by:
I'm displaying product thumbnails with brief descriptions on web pages. Clicking on the product does a javascript popup with larger image and detailed description info passed to the javascript...
3
by: Maqsood Ahmed | last post by:
Hello, Here is the scenario: I have a datagrid on a winform and a datatable is set as its datasource. I have added DataGridTableStyle in datagrid's TableStyles property. Some of Gridstyles are...
5
by: AC | last post by:
Any reason i'm having trouble with: DataGrid1.Columns(7).ItemStyle.HorizontalAlign = HorizontalAlign.Right I'm trying to directly set the column alignment of a datagrid created at runtime.. ...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
5
by: cwbp17 | last post by:
Hi all, Have a datagrid that displays the price column of a table. Went to the Datagrid's Property builder and set the 'Data Formatting expression' for the PRICE column to {0:c}, so that the...
1
by: nate axtell | last post by:
In VB .NET I load the contents of an Excel or comma seperated values file into a dataGrid (via a datatable). One of the columns has a comma in the name of the column. So for the comma separated...
7
by: Arpan | last post by:
Assume that a database table has the following 4 columns - ID, UserID, Subject & Marks. I am retrieving the records existing in this DB table & displaying them in a DataGrid like this: <script...
1
by: sushant2009 | last post by:
Hi , I want to display empty databae table(actually table contains lot of records) to datagrid using dataset and dataadpter. After displaying i will fill new records in datagrid and i will save...
2
by: chike_oji | last post by:
Hello, I am displaying data retrieved from a database as a httpresponse in a webform. I noticed that some characters such as the comma (,), display as special characters in the web browser...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.