Custom Format Strings for BoundField column

Discussion in 'ASP .Net' started by Adam Right, Feb 12, 2008.

  1. Adam Right

    Adam Right Guest

    in gridview how can i custom format a decimal value for BoundField column ?

    i want to set
    125.25000 ---> 125,25
    5.20000 -->5,2
    45.00000 --> 45

    I am using DataFormatString="{0:#,#.##}" but it does not work ..

    any idea ?
    Adam Right, Feb 12, 2008
    #1
    1. Advertising

  2. Set HtmlEncode=false;

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


    "Adam Right" <AdamRight> wrote in message
    news:uN%...
    > in gridview how can i custom format a decimal value for BoundField column
    > ?
    >
    > i want to set
    > 125.25000 ---> 125,25
    > 5.20000 -->5,2
    > 45.00000 --> 45
    >
    > I am using DataFormatString="{0:#,#.##}" but it does not work ..
    >
    > any idea ?
    >
    >
    Eliyahu Goldin, Feb 12, 2008
    #2
    1. Advertising

  3. Adam Right

    Adam Right Guest

    Thanks Eliyahu ..
    Adam Right, Feb 12, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YWRhbUB0d3Yub3Jn?=

    custom column format for asp.net datagrid

    =?Utf-8?B?YWRhbUB0d3Yub3Jn?=, Jul 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    509
    Eliyahu Goldin
    Jul 18, 2004
  2. John Mason
    Replies:
    0
    Views:
    841
    John Mason
    Aug 20, 2006
  3. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    723
    Malcolm
    Jun 24, 2006
  4. Nathan Sokalski

    Custom classes, ToString, and format strings

    Nathan Sokalski, Jun 8, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    339
    Cor Ligthert[MVP]
    Jun 9, 2008
  5. Format Date in BoundField

    , Dec 8, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    1,188
Loading...

Share This Page