2

I have a XamDataGrid with a column of floats, and I want these floats to be shown with InvariantCulture, i.e. with a point instead of a comma. How can I do that?

Jackdaw
  • 7,626
  • 5
  • 15
  • 33
gartenriese
  • 4,131
  • 6
  • 36
  • 60
  • does the `XamDataGrind` have a `DataFormatString` Property..? if so you could try the following in the `` template.. `DataFormatString="{0:###.000}"` this will have a precision out to `3 decimal places` please show what your ItemTemplate looks like as well thanks – MethodMan Jun 06 '16 at 14:05
  • There is no DataFormatString property in XamDataGrid. What do you mean by ItemTemplate? – gartenriese Jun 06 '16 at 14:12
  • If you are not familiar with `ItemTemplate` this is what google is there for.. also try looking at the documentation / examples that `XamDataGrid` has .. good luck – MethodMan Jun 06 '16 at 14:16
  • @MethodMan: I did, that's why I asked here. Thanks anyways. – gartenriese Jun 06 '16 at 14:57

1 Answers1

1
  1. Any columns in the XamDataGrid control are inherited from the Infragistics.Windows.DataPresenter.Field class already supporting the InvariantCulture formatting. Therefore any float type data will be displayed using the current region format settings.

  2. If it necessary to format data in some specific format a corresponding converter can be provided like below:

    <igDP:Field x:Name="Total" Converter="{StaticResource TotalFormatConverter}" />

Community
  • 1
  • 1
Jackdaw
  • 7,626
  • 5
  • 15
  • 33