Display Integer without decimal

Discussion in 'ASP .Net' started by pargat.singh@gmail.com, Mar 26, 2007.

  1. Guest

    Hi Everyone:

    I have a grid view which is bound to dataset from oracle store
    proceduer. I have a number filed but it is showing in decimal like
    0.0000 or 24.0000 etc. Can someone please tell me how can show o or 24
    only without decimal. I tried dataformatstring prorerty of bound field
    but no luck.

    Thanks in advance.

    Pargat
     
    , Mar 26, 2007
    #1
    1. Advertising

  2. Returns the integer portion of a number.

    Int(5.3333) returns 5.


    <> wrote in message news:...
    > Hi Everyone:
    >
    > I have a grid view which is bound to dataset from oracle store
    > proceduer. I have a number filed but it is showing in decimal like
    > 0.0000 or 24.0000 etc. Can someone please tell me how can show o or 24
    > only without decimal. I tried dataformatstring prorerty of bound field
    > but no luck.
    >
    > Thanks in advance.
    >
    > Pargat
    >
     
    Jon Paal [MSMD], Mar 26, 2007
    #2
    1. Advertising

  3. Mark Rae Guest

    <> wrote in message
    news:...

    > I tried dataformatstring prorerty of bound field but no luck.


    You probably forgot to include:

    HtmlEncode="false"

    in the bound column tag
     
    Mark Rae, Mar 26, 2007
    #3
  4. Guest

    On Mar 26, 3:47 am, "Mark Rae" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > I tried dataformatstring prorerty of bound field but no luck.

    >
    > You probably forgot to include:
    >
    > HtmlEncode="false"
    >
    > in the bound column tag


    Thanks. I am getting an error when i set DataFormatString="{0:D}"
    HtmlEncode="false".
     
    , Mar 26, 2007
    #4
  5. Guest

    On Mar 25, 9:52 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
    dot com> wrote:
    > Returns the integer portion of a number.
    >
    > Int(5.3333) returns 5.
    >
    >
    >
    > <> wrote in messagenews:...
    > > Hi Everyone:

    >
    > > I have a grid view which is bound to dataset from oracle store
    > > proceduer. I have a number filed but it is showing in decimal like
    > > 0.0000 or 24.0000 etc. Can someone please tell me how can show o or 24
    > > only without decimal. I tried dataformatstring prorerty of bound field
    > > but no luck.

    >
    > > Thanks in advance.

    >
    > > Pargat- Hide quoted text -

    >
    > - Show quoted text -


    Thanks. I have replace the SP with to_number.
     
    , Mar 26, 2007
    #5
  6. Mark Rae Guest

    <> wrote in message
    news:...

    > On Mar 26, 3:47 am, "Mark Rae" <> wrote:
    >> <> wrote in message
    >>
    >> news:...
    >>
    >> > I tried dataformatstring prorerty of bound field but no luck.

    >>
    >> You probably forgot to include:
    >>
    >> HtmlEncode="false"
    >>
    >> in the bound column tag

    >
    > Thanks. I am getting an error when i set DataFormatString="{0:D}"
    > HtmlEncode="false".


    DataFormatString="{0:0}" HtmlEncode="false"
     
    Mark Rae, Mar 26, 2007
    #6
    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. Ven
    Replies:
    3
    Views:
    1,352
  2. Gilbert Fine
    Replies:
    8
    Views:
    925
    Zentrader
    Aug 1, 2007
  3. Vitaliy
    Replies:
    1
    Views:
    494
    Peter Otten
    May 29, 2008
  4. valpa
    Replies:
    11
    Views:
    1,581
    Steven D'Aprano
    Mar 24, 2009
  5. Replies:
    0
    Views:
    314
Loading...

Share This Page