I have a property that is a double and when that property gets displayed on the grid, it defaults to having a dollar sign. How do I remove the dollar sign? I have:
The igWpf Field is where I am having the issue. How do you remove the dollar sign from a double in an igWPF Field?
<igWpf:XamDataGrid Name="Name"
DataSource="{Binding Path=SomeName}"
GroupByAreaLocation="None"
BorderBrush="{StaticResource LightGrayBorder}"
Theme="MetroDark"
FontSize="11"
ScrollingMode="Deferred">
<igWpf:XamDataGrid.FieldSettings>
<igWpf:FieldSettings AllowEdit="False" AutoSizeScope="RecordsInView" AutoSizeOptions="Label, DataCells" CellHeight="35" AllowRecordFiltering="True" FilterLabelIconDropDownType="SingleSelect"/>
</igWpf:XamDataGrid.FieldSettings>
<igWpf:XamDataGrid.FieldLayoutSettings>
<igWpf:FieldLayoutSettings AllowAddNew="False" AllowDelete="False" AutoGenerateFields="False" AutoArrangeCells="Never" RecordSelectorLocation="None" />
</igWpf:XamDataGrid.FieldLayoutSettings>
<igWpf:XamDataGrid.FieldLayouts>
<igWpf:FieldLayout ParentFieldName="SomeName">
<igWpf:FieldLayout.Fields>
<igWpf:Field Name="SomeName" Label="ID" Column="0" Width="Auto" />
</igWpf:FieldLayout.Fields>
</igWpf:FieldLayout>
</igWpf:XamDataGrid.FieldLayouts>
</igWpf:XamDataGrid>
CodePudding user response:
The default editor for decimal fields is the XamCurrencyEditor. You can change this by setting the Field's EditorType property to use the XamNumericEditor.
<igData:Field Name="MyField">
<igData:Field.Settings>
<igData:FieldSettings EditorType="{x:Type igEditors:XamNumericEditor}" EditAsType="{x:Type sys:Double}" />
</igData:Field.Settings>
</igData:Field>