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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. data formating

data formating

Scheduled Pinned Locked Moved C#
questiondatabasemysql
2 Posts 2 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.
  • M Offline
    M Offline
    muharrem
    wrote on last edited by
    #1

    I have all my data in MySQL as char data type in "en" locale. That means all int and float and double type data are stored as char data without thousand separator, but float and double data have ofcourse with decimal (.) separator. My question is : How can I display those data according to program's locale setting. Since the data already in char type I could not find out a smouth way to display the data returned from database accordingly. My program can change the locale settings at run time according to user request. By the way I use DataGridView for the display control on my win form. Thanks, Muharrem

    D 1 Reply Last reply
    0
    • M muharrem

      I have all my data in MySQL as char data type in "en" locale. That means all int and float and double type data are stored as char data without thousand separator, but float and double data have ofcourse with decimal (.) separator. My question is : How can I display those data according to program's locale setting. Since the data already in char type I could not find out a smouth way to display the data returned from database accordingly. My program can change the locale settings at run time according to user request. By the way I use DataGridView for the display control on my win form. Thanks, Muharrem

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      Use one of the TryParse overloads for the data type that you need to display.

      Dave
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

      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