How to use DataFormatString?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paulo

    How to use DataFormatString?

    Hi, can you help me how to display R$ 2,80 on the GridView BoundField?

    The data comes from a DataBase, but it shows me: 2,8000

    I want to display R$2,80 wich is the currency of my country! What is the
    DataFormatStrin g property of the column?

    Thank you!


  • Mark Rae [MVP]

    #2
    Re: How to use DataFormatStrin g?

    "Paulo" <eris_paulo@ter ra.com.brwrote in message
    news:esdts5ftIH A.4716@TK2MSFTN GP06.phx.gbl...
    Hi, can you help me how to display R$ 2,80 on the GridView BoundField?
    >
    The data comes from a DataBase, but it shows me: 2,8000
    >
    I want to display R$2,80 wich is the currency of my country! What is the
    DataFormatStrin g property of the column?
    "R$0,00"

    Don't forget to include HtmlEncode="fal se" in the BoundField tag...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Paulo

      #3
      Re: How to use DataFormatStrin g?

      I tried it and shows always R$0,00 on the rows...

      "Mark Rae [MVP]" <mark@markNOSPA Mrae.netescreve u na mensagem
      news:eWCfKIgtIH A.4912@TK2MSFTN GP03.phx.gbl...
      "Paulo" <eris_paulo@ter ra.com.brwrote in message
      news:esdts5ftIH A.4716@TK2MSFTN GP06.phx.gbl...
      >Hi, can you help me how to display R$ 2,80 on the GridView BoundField?
      >>
      >The data comes from a DataBase, but it shows me: 2,8000
      >>
      >I want to display R$2,80 wich is the currency of my country! What is the
      >DataFormatStri ng property of the column?
      >
      "R$0,00"
      >
      Don't forget to include HtmlEncode="fal se" in the BoundField tag...
      >
      >
      --
      Mark Rae
      ASP.NET MVP
      http://www.markrae.net

      Comment

      • Mark Rae [MVP]

        #4
        Re: How to use DataFormatStrin g?

        "Paulo" <eris_paulo@ter ra.com.brwrote in message
        news:%23Mtj0agt IHA.4492@TK2MSF TNGP02.phx.gbl. ..

        [top-posting corrected]
        >>Hi, can you help me how to display R$ 2,80 on the GridView BoundField?
        >>>
        >>The data comes from a DataBase, but it shows me: 2,8000
        >>>
        >>I want to display R$2,80 wich is the currency of my country! What is the
        >>DataFormatStr ing property of the column?
        >>
        >"R$0,00"
        >>
        >Don't forget to include HtmlEncode="fal se" in the BoundField tag...
        >
        >I tried it and shows always R$0,00 on the rows...
        Please show your markup...


        --
        Mark Rae
        ASP.NET MVP


        Comment

        • =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=

          #5
          RE: How to use DataFormatStrin g?

          Paulo,

          Try {0:C2} (have in mind it applies the current locale currency).

          Regards
          --
          Milosz


          "Paulo" wrote:
          Hi, can you help me how to display R$ 2,80 on the GridView BoundField?
          >
          The data comes from a DataBase, but it shows me: 2,8000
          >
          I want to display R$2,80 wich is the currency of my country! What is the
          DataFormatStrin g property of the column?
          >
          Thank you!
          >
          >
          >

          Comment

          Working...