DataBoundColumn in datagrid DataFormatString is not working, why?

  • Thread starter Thread starter ThunderMusic
  • Start date Start date
T

ThunderMusic

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
 
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
 
htmlencoding off!

ThunderMusic said:
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
 
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
 
oups, sorry, Asp:BoundColumn (not asp:databoundcolumn)... Well, it doesn't
work anyway... ;) I mean, vs 2003 does not recognize the property...

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top