Ignoring culture on DataGrid

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

    Ignoring culture on DataGrid

    Hi, I have a C# usercontrol, that contains a datagrid, attached to a
    dataset with XML schema. The host application uses globalisation to
    set the locale, and my usercontrol sees this change, and makes changes
    to the data in the dategrid.

    The problem is, decial numbers are changed from xx.xx to xx,xx when
    you use some locale (French, German for example). Whilst the
    underlying data is still writted to XML correctly, it causes problems
    in our UI, as all our controls do not work this way, and the rule is
    decials are always entered using dot notation.

    How can I get my datasource to work correctly? I have tried setting
    the locals on the callback when the locale changes, to "en-gb", but it
    does not help. I think it's the UI culture thats the problem, not the
    underlying data,

    Ran out of ideas!!!

    Any help appreciated.
  • Pipo

    #2
    Re: Ignoring culture on DataGrid

    Did you tried the System.Globaliz ation.CultureIn fo.InvariantCul ture??


    "Mark Gillespie" <email@markgill espie.co.ukschr eef in bericht
    news:2a1b0555-cb02-469d-9b37-d91bb4ee593f@u7 2g2000hsf.googl egroups.com...
    Hi, I have a C# usercontrol, that contains a datagrid, attached to a
    dataset with XML schema. The host application uses globalisation to
    set the locale, and my usercontrol sees this change, and makes changes
    to the data in the dategrid.
    >
    The problem is, decial numbers are changed from xx.xx to xx,xx when
    you use some locale (French, German for example). Whilst the
    underlying data is still writted to XML correctly, it causes problems
    in our UI, as all our controls do not work this way, and the rule is
    decials are always entered using dot notation.
    >
    How can I get my datasource to work correctly? I have tried setting
    the locals on the callback when the locale changes, to "en-gb", but it
    does not help. I think it's the UI culture thats the problem, not the
    underlying data,
    >
    Ran out of ideas!!!
    >
    Any help appreciated.

    Comment

    Working...