Re: Gridview column formatting



Set HtmlEncode = false for the column.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"et" <eagletender2001@xxxxxxxxx> wrote in message
news:OyPzpFOOHHA.2468@xxxxxxxxxxxxxxxxxxxxxxx
I have tried everything to display a bound column in a gridview to 2
decimals only. The column is a price, and when I run the query in sql, he
value displays as 10.00. Yet in the grid view it displays as 10.0000. I
have tried various settings in the dataformatstring, and it seems to ignore
everything I put there; I've tried: {0}, {0:F2}, {0:d}, {0:c}, among
others. What am I doing wrong?



.



Relevant Pages

  • Re: streaming images
    ... Software Developer & Consultant ... Microsoft MVP ... I have a ADO.NET dataset that contains a jpeg (blob data) and some ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: label in footertemplate of datagrid
    ... Software Developer & Consultant ... Microsoft MVP ... FooterTemplate of the DataList control? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Reducing Figures To Two Decimal Places
    ... | scattered around many worksheets according to product families. ... | worksheets have several price tables in them. ... | figure has many decimals behind it. ... | because employees use this workbook as a source of data via ad-hoc links to ...
    (microsoft.public.excel.misc)
  • Re: DateTimePicker
    ... >> William Vaughn ... >> Author, Mentor, Consultant ... >> Microsoft MVP ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ArgumentException on setting ConnectionString
    ... >> Author, Mentor, Consultant ... >> Microsoft MVP ... >> INETA Speaker ...
    (microsoft.public.dotnet.framework.adonet)

Loading