473,770 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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%><%#Co ntainer.DataIte m("City")%></td>

Any help will be greatly appreciated!

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

Try something like this
<%#Container.D ataItem("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%><%#Co ntainer.DataIte m("City")%></td>

Any help will be greatly appreciated!

--
Sandy

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

Try this
<%#Container.D ataItem("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%><%#Co ntainer.DataIte m("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.DataI tem("City") has a space?

Try something like this
<%#Container.D ataItem("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%><%#Co ntainer.DataIte m("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
2206
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 functions from the table data. Products can change frequently, and I want to make the maintenance of this info easier by non-techies (each product has an image name, image width (currently not using getimagesize), a short description, and a long...
3
2813
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 numeric (doubles) and I have set their format to #,0.0000 since I want to display the values to comma seperated (at thousands) and till four decimal places. User can also edit values in the grid. So far so good. The Problem:
5
2279
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.. AC
3
4928
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 are Web Control & not HTML control. One of these buttons whose title is Delete is added on the aspx page in design view & also I double clicked on this button in design view to get the onclick code for this button in the code behind page. & for...
5
4564
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 dollar sign, the comma, and the decimal are included (i.e. $44,644.48) Managed to update the price column of the datagrid back to the database, as long as, the user doesn't delete the dollar sign (in the 0 position).
1
5311
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 values files I put double quotes are the column name. What I see is that the name ends up getting displayed correctly in the DataGrid column, "Class (1,2,3)". When I click on the column to sort I see the following error: "Additional information:...
7
3577
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 runat="server"> Sub Page_Load(obj As Object, ea As EventArgs) Dim dSet As DataSet Dim sqlConn As SqlConnection Dim sqlDapter As SqlDataAdapter
1
1398
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 it in above thing i want to save new records using datagrid,dataset and dataadpter withought displaying previous ones Some one will tell me please how to do this
2
2361
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 (Internet Explorer). It displays something like $^^% instead of a comma. Please how can I have the browser display the comma as it is from the database.
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8931
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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 we have to send another system
3
2849
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.