Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
XamNumericEditor does not fire DataTrigger on ValueToDisplayTextConverter.
posted

Hi,

 I am trying to change DisplayText of XamNumericEditor on a certain condition. But, DataTrigger never fires. In below mentioned code, background color is changing. But, converter set on ValueToDisplayTextConverter is not getting called. Having said that, converter gets called when I exit from edit mode. I want the datatrigger to fire when value is displayed for the first time.

Have attached complete sample for your reference.

<igDP:UnboundField BindingPath="Price" BindingMode="TwoWay" Label="Ps Px" Name="PosInsidePx">

<igDP:Field.Settings>

<igDP:FieldSettings EditAsType="{x:Type System:Double}" >

<igDP:FieldSettings.EditorStyle>

<Style TargetType="igED:XamNumericEditor">

<Setter Property="Format" Value="###,##0.0" />

<Setter Property="Mask" Value="{}{double:-9.3}" />

<Setter Property="HorizontalContentAlignment" Value="Right"/>

<!--<Setter Property="ValueToDisplayTextConverter" Value="{StaticResource DecimalToTicksConverter}"/>-->

<Style.Triggers>

<DataTrigger Binding="{Binding DataItem.IsMuniType}" Value="False">

<Setter Property="Background" Value="Aqua"/>

<Setter Property="ValueToDisplayTextConverter" Value="{StaticResource DecimalToTicksConverter}"/>

</DataTrigger>

</Style.Triggers>

</Style>

</igDP:FieldSettings.EditorStyle>

</igDP:FieldSettings>

</igDP:Field.Settings>

</igDP:UnboundField>

Thanks,

Durga

DataGridTreasuryTick.zip