dynamic dataformatstring in a gridview

Discussion in 'ASP .Net' started by Tarren, Aug 18, 2006.

  1. Tarren

    Tarren Guest

    Hi:

    I am dealing with gridviews in .NET 2.0

    If the column value "total" is negative I want the format string to be:

    ({0:#,##0}) with the parentheses

    if it is nonnegative i just want it to be

    {0:#,##0}

    How could I dynamically apply a dataformatstring?

    Thanks
     
    Tarren, Aug 18, 2006
    #1
    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. Gerhard Pretorius

    August CTP DataFormatString in Gridview not working

    Gerhard Pretorius, Sep 6, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,717
    Louis
    Sep 22, 2005
  2. Gerhard Pretorius

    DataformatString in Gridview and Detalsview ignored

    Gerhard Pretorius, Sep 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    631
    Gerhard Pretorius
    Sep 8, 2005
  3. Jon

    Gridview and dataformatstring

    Jon, Nov 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,648
    =?Utf-8?B?Q3VydCBLb3BwYW5n?=
    Nov 9, 2005
  4. Hardy Wang
    Replies:
    1
    Views:
    5,639
    Hardy Wang
    Dec 12, 2005
  5. Tina
    Replies:
    2
    Views:
    1,632
    lildakes
    Mar 26, 2008
Loading...

Share This Page