473,795 Members | 3,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

formatting Gridview

I'm trying to format the GridView on my web form and its not working.

for money I have {0:C} and for date fields, I have {0:d} and the format
isn't changing, what else do I need to do to get the formatting working in
the gridView?

May 15 '06 #1
3 2401
I've had the same problem with GridView not taking the format command. I've
simply converted the column to a template at the formatting then works.

Peter Kellner
http://peterkellner.net
"CSharpguy" <CS*******@disc ussions.microso ft.com> wrote in message
news:E8******** *************** ***********@mic rosoft.com...
I'm trying to format the GridView on my web form and its not working.

for money I have {0:C} and for date fields, I have {0:d} and the format
isn't changing, what else do I need to do to get the formatting working in
the gridView?

May 15 '06 #2
Actually I got it working without doing that. I changed HTML EnCode = false
and your formatting will work
"PeterKelln er" <ho****@fetchem ail.com> wrote in message
news:iO******** ************@co mcast.com...
I've had the same problem with GridView not taking the format command.
I've simply converted the column to a template at the formatting then
works.

Peter Kellner
http://peterkellner.net
"CSharpguy" <CS*******@disc ussions.microso ft.com> wrote in message
news:E8******** *************** ***********@mic rosoft.com...
I'm trying to format the GridView on my web form and its not working.

for money I have {0:C} and for date fields, I have {0:d} and the format
isn't changing, what else do I need to do to get the formatting working
in
the gridView?


May 16 '06 #3
thanks for letting me know! One less mystery.

"CSharpguy" <me@me.com> wrote in message
news:ux******** ******@TK2MSFTN GP03.phx.gbl...
Actually I got it working without doing that. I changed HTML EnCode =
false
and your formatting will work
"PeterKelln er" <ho****@fetchem ail.com> wrote in message
news:iO******** ************@co mcast.com...
I've had the same problem with GridView not taking the format command.
I've simply converted the column to a template at the formatting then
works.

Peter Kellner
http://peterkellner.net
"CSharpguy" <CS*******@disc ussions.microso ft.com> wrote in message
news:E8******** *************** ***********@mic rosoft.com...
I'm trying to format the GridView on my web form and its not working.

for money I have {0:C} and for date fields, I have {0:d} and the format
isn't changing, what else do I need to do to get the formatting working
in
the gridView?



May 16 '06 #4

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

Similar topics

3
6222
by: washoetech | last post by:
I have a gridview control. In this grid view there is a column for the price of an item. Some of the prices have a dollar sign in front of it and some dont. How do I get rid of the dollar sign if it is in front of the value? My guess would be to use a template column but I dont know how to go about this. Any ideas? Below is an example of what the data looks like raw from the database: $456.95 200.89
1
4577
by: euan | last post by:
HI Guys, I have bee using conditional formatting in the datagrid recently and I am moving over to framework 2.0 and noticed the datagrid has been replaced by the gridview. So, I would like to do conditional formatting on the gridview but it doesnt have the same methods. Currently in my datagrid I have this (this is just hacked together randomly but gives you the idea):
4
2619
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I re-format the updated row fields. I have looked at gridView.rowUpdated method, but cannot figure out how....
3
2097
by: Simon Harvey | last post by:
Hi all, I'm having problems getting my date to format. Someone told me that with the GridView, you need to use a TemplateColumn and not a BoundColumn when displaying dates. Given that, can anyone see what the problem is with the following code.... <asp:TemplateField HeaderText="Departure Date"> <ItemTemplate>
4
8336
by: Ken Wigle | last post by:
All, I would be very grateful for any help on this question. I have an application in asp.net 2.0 where I dynamically create a datatable and then bind that to a gridview. Unfortunately, the date column always shows the date and time while I just want the short date. I have tried applying a format string {0:d} but to no avail. I saw a lot of posts regarding the htmlencode property but I do not know how to turn that off for a...
1
1873
by: AmitKu | last post by:
I've got the Gridview going at full speed, and I've enabled editing, but when I click on the "edit" button, this ugly editing UI comes up. Well it's not ugly, but it's not great either. How do I change the font/font size of the text thats being edited? Thanks in advance, Amit
2
2089
by: pgonzo | last post by:
In my initial tests with the GridView control, I cannot understand why the DataFormatString attribute has no affect on the column formatting. The 'creation_date' field is being reported as "3/30/02 14:23:28". I want to display it as "03/30/02". I've included the code below. Can anyone offer an explanation? <asp:SqlDataSource ID="DD_Issues" runat="server"
0
1130
by: Adam Sandler | last post by:
Hello, My codebehind builds a GridView at runtime and shovels the data off as a part of a callback... Dim returnstring As String = String.Empty Dim gv As New GridView gv.DataSource = ds gv.DataBind()
2
2420
by: tomh2099 | last post by:
Hi, Hi, I have an ASP.NET 2005 application (using VB) with a GridView control that needs to have the last 5 or 6 rows in Bold or maybe some other special formatting. Most of the rows show monthly info but the last few show other information. The gridview is bound to a stored procedure that returns data something like this: 'Jan 2007', 0 'Feb 2007', 8
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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
10435
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
10000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
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
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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.