Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Gridview Number Format

Gridview Number Format

Scheduled Pinned Locked Moved ASP.NET
questionvisual-studio
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sasan56
    wrote on last edited by
    #1

    Hi Dear I use VS 2005. in a gridview i set one of numeric column DataFormat String to {0:N} and a number like 123456 at out put is like : 123,456,00 but i want to omit the decimal. like : 123,456 how can i do that?

    T 1 Reply Last reply
    0
    • S sasan56

      Hi Dear I use VS 2005. in a gridview i set one of numeric column DataFormat String to {0:N} and a number like 123456 at out put is like : 123,456,00 but i want to omit the decimal. like : 123,456 how can i do that?

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      I think DataFormatString="{0:###,###,###}" will work.

      I didn't get any requirements for the signature

      S H 2 Replies Last reply
      0
      • T ToddHileHoffer

        I think DataFormatString="{0:###,###,###}" will work.

        I didn't get any requirements for the signature

        S Offline
        S Offline
        sasan56
        wrote on last edited by
        #3

        Thanks , it work correctly.

        1 Reply Last reply
        0
        • T ToddHileHoffer

          I think DataFormatString="{0:###,###,###}" will work.

          I didn't get any requirements for the signature

          H Offline
          H Offline
          Herman T Instance
          wrote on last edited by
          #4

          DataFormatString="{0:#,#}" is enough to make the trick hapen.

          In Word you can only store 2 bytes. That is why I use Writer.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups