473,396 Members | 1,970 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,396 software developers and data experts.

DataBoundColumn in datagrid DataFormatString is not working, why?

Hi,
I have a datagrid. In my datagrid I have a DataBoundColumn with the
property DataFormatString set to "{0:F2}" so it should format the content of
the cell to a floating number with 2 digits. It does not work, at the moment
it always puts 4 digits (which is the same as before I put the format). What
could be the cause?

Here is the code for the column... it displays the good data, only not in
the good format:

<asp:BoundColumn DataFormatString="{0:F2}" DataField="Total"
HeaderText="Montant" />

Thanks

ThunderMusic
Jan 24 '06 #1
4 2337
Hi,
Does anyone know what could be the problem or solution to this? Do you need
more code? could it be in the Datagrid definition?

Thanks

ThunderMusic

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:uR**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have a datagrid. In my datagrid I have a DataBoundColumn with the
property DataFormatString set to "{0:F2}" so it should format the content
of the cell to a floating number with 2 digits. It does not work, at the
moment it always puts 4 digits (which is the same as before I put the
format). What could be the cause?

Here is the code for the column... it displays the good data, only not in
the good format:

<asp:BoundColumn DataFormatString="{0:F2}" DataField="Total"
HeaderText="Montant" />

Thanks

ThunderMusic

Jan 26 '06 #2
htmlencoding off!

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> schreef in bericht
news:ud****************@tk2msftngp13.phx.gbl...
Hi,
Does anyone know what could be the problem or solution to this? Do you
need more code? could it be in the Datagrid definition?

Thanks

ThunderMusic

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:uR**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have a datagrid. In my datagrid I have a DataBoundColumn with the
property DataFormatString set to "{0:F2}" so it should format the content
of the cell to a floating number with 2 digits. It does not work, at the
moment it always puts 4 digits (which is the same as before I put the
format). What could be the cause?

Here is the code for the column... it displays the good data, only not
in the good format:

<asp:BoundColumn DataFormatString="{0:F2}" DataField="Total"
HeaderText="Montant" />

Thanks

ThunderMusic


Jan 26 '06 #3
ok, and where can I find this htmlencoding? because when I try to use it, it
tells me that asp:Databoundcolumn does not support this property.

Thanks

"Edwin Knoppert" <in**@pbsoft.speedlinq.nl> wrote in message
news:dr**********@azure.qinip.net...
htmlencoding off!

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> schreef in bericht
news:ud****************@tk2msftngp13.phx.gbl...
Hi,
Does anyone know what could be the problem or solution to this? Do you
need more code? could it be in the Datagrid definition?

Thanks

ThunderMusic

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:uR**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have a datagrid. In my datagrid I have a DataBoundColumn with the
property DataFormatString set to "{0:F2}" so it should format the
content of the cell to a floating number with 2 digits. It does not
work, at the moment it always puts 4 digits (which is the same as before
I put the format). What could be the cause?

Here is the code for the column... it displays the good data, only not
in the good format:

<asp:BoundColumn DataFormatString="{0:F2}" DataField="Total"
HeaderText="Montant" />

Thanks

ThunderMusic



Jan 27 '06 #4
oups, sorry, Asp:BoundColumn (not asp:databoundcolumn)... Well, it doesn't
work anyway... ;) I mean, vs 2003 does not recognize the property...

thanks
"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
ok, and where can I find this htmlencoding? because when I try to use it,
it tells me that asp:Databoundcolumn does not support this property.

Thanks

"Edwin Knoppert" <in**@pbsoft.speedlinq.nl> wrote in message
news:dr**********@azure.qinip.net...
htmlencoding off!

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> schreef in bericht
news:ud****************@tk2msftngp13.phx.gbl...
Hi,
Does anyone know what could be the problem or solution to this? Do you
need more code? could it be in the Datagrid definition?

Thanks

ThunderMusic

"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:uR**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have a datagrid. In my datagrid I have a DataBoundColumn with the
property DataFormatString set to "{0:F2}" so it should format the
content of the cell to a floating number with 2 digits. It does not
work, at the moment it always puts 4 digits (which is the same as
before I put the format). What could be the cause?

Here is the code for the column... it displays the good data, only not
in the good format:

<asp:BoundColumn DataFormatString="{0:F2}" DataField="Total"
HeaderText="Montant" />

Thanks

ThunderMusic



Jan 27 '06 #5

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

Similar topics

2
by: brian richards | last post by:
The datagrid in my page always looks greyed out. But DataGrid.Enabled is set to true. It's never set to false. Is there any other way enabled may be set to false? Or maybe another reason other than...
1
by: J.B | last post by:
I have a datagrid that will display different datasets, (it runs different sprocs based on a value in the querystring) but it will always return 6 columns. The 5th and 6th columns are always Date...
2
by: Bob Trabucco | last post by:
Hello all, I have a Datagrid on a page. 1 column is a template column with a checkbox (unbound). The rest of the columns are databound that are added programatically. If in the Page_Load I...
10
by: ruca | last post by:
Hi I want to format some columns of my DataGrid control. Example, one of my fields of DataSet is a DATE field and in BD he is Ok, but when I show him in datagrid he comes with hours too. I...
3
by: D. Shane Fowlkes | last post by:
I have a Datagrid which in theory, should allow you to edit and update the records. I've stripped my test page down so that it's only attempting to update one field - "description". Yet when I...
0
by: Tim::.. | last post by:
Please, please, please help!!! I have a datagrid that displays a list of contacts on our intranet site using the ActiveDirectory as it's main Data Source. I want to be able to show an image of...
2
by: tshad | last post by:
I am having a problem with my Datagrid that displays my Files via GetFiles() If I use a HyperLinkColumn - I can use the column name "Name" which is what the result from GetFiles(). ...
1
nateraaaa
by: nateraaaa | last post by:
While working on a recent project I discovered how useful the CommandArgument property can be. I needed to determine the record_id of a row displayed in my datagrid. When the user clicked the Edit...
0
by: webaccess | last post by:
Hi Friends ..!! I want to use datagrid/dataview control to data in tablular format,also I want to add paging and format the data of table column. Problem is data is coming from API Dom in as...
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: 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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...
0
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,...
0
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...
0
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...

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.