I have written an Ivalueconverter that will convert any double or integer into an empty string if the value is 0.
I just can't figure out how to apply it.
<Window.Resources>
<controls:DisplayZeroAsBlank x:Key="DisplayZeroAsBlank"/>
</Window.Resources>
....
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="zero">
<Setter Property="Value">
<Setter.Value>
<Binding Converter="{StaticResource DisplayZeroAsBlank}"></Binding>
</Setter.Value>
</Setter>
</Style>
...
<igDP:Field Name="OurAsk">
<igDP:Field.Settings>
<igDP:FieldSettings CellValuePresenterStyle="{StaticResource zero}" />
</igDP:Field.Settings>
</igDP:Field>
How should this be done?
Hello,
If you want to display an empty string when a value is zero, it is best to use an IValueConverter and apply it at the ValueToDisplayTextConverter property of the editor. You can create a style for the editor of the specific field and apply it at the Field -> Settings -> EditorStyle property. Another way would be to apply the converter to the Converter property of the Field.