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
1825
Adding Mask prevents property change from firing immediately
posted

this seems to be a potential bug.

Earlier I had bound my field like this.

   <igDP:UnboundField Name="Qty"  Binding="{Binding Quantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Quantity" />

As soon as I was updating the Quantity field the property changed event was firing. So far so Good.
Now i needed to add a conditional mask to the Quantity field, so i modified my xaml to.
   <igDP:UnboundField Name="Qty"  Binding="{Binding Quantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Quantity" >
                                <igDP:UnboundField.Settings>
                                    <igDP:FieldSettings>
                                        <igDP:FieldSettings.EditorStyle>
                                            <Style TargetType='{x:Type igEditors:XamNumericEditor}'>
                                                <Setter Property="Mask" Value="{Binding Path=DataContext.TradeEditorState.QtyMask, 
                                                    RelativeSource = {RelativeSource FindAncestor, AncestorType={x:Type igDP:XamDataGrid}}}"/>
                                                <Setter Property="Background" Value="Transparent" />
                                            Style>                                         igDP:FieldSettings.EditorStyle>                                     igDP:FieldSettings>                                 igDP:UnboundField.Settings>                             igDP:UnboundField>



This caused the immediate property changed event to break, only when i tab out of the Quantity field does the the property change event get fired.
As i am updating the value the property change event does not get fired as it used to fire before.
Parents
  • 22015
    posted

    Hello Raul,

     

    Thank you for your post!

     

    I have been looking into your issue and I was not able to reproduce it. I have created a small sample application to test this issue. In the sample application I have a simple collection bound to the XamDataGrid. What I can suggest is to use Field instead of UnboundField if the property you are binding to is from the Collection bound to the XamDataGrid. The in my sample application I am setting a Style for the XamNumericInput and I am setting the mask property too.

     

    Would you please modify the sample application attached with the functionality you are using, so it shows the issue. This way I would be able to reproduce it and provide you with further support.

     

    Thank you for the cooperation. Looking forward to hearing from you.

Reply Children