I have the following in xamDataGrid resources:
<Style x:Key="NumberStyle" TargetType="{x:Type igEditors:XamTextEditor}"> <Style.Setters> <Setter Property="Format" Value="#,##0.00"/> <Setter Property="InvalidValueBehavior" Value="RetainValue" /> <Setter Property="HorizontalContentAlignment" Value="Right"/> </Style.Setters> </Style>
And following field:
<igDP:UnboundField Name="PriceLocal" Width="70" Label="Price" Column="5" > <igDP:UnboundField.Settings> <igDP:FieldSettings EditorType="{x:Type igEditors:XamTextEditor}" EditorStyle="{StaticResource NumberStyle}" ></igDP:FieldSettings> </igDP:UnboundField.Settings> </igDP:UnboundField>
The above works for bound field but not for unbound field - please help!
Thanks.
Hello Jay6447,
Thank you for your post!
I have been looking into it and have created a small sample application in order to test the functionality you have reported. In the sample application I have an UnboundField, that the style that you have provided in your initial post, in the Resources of the XamDataGrid.
Using this sample application I was not able to reproduce the issue you have reported. I am attaching the sample I have been testing with for your reference.
Would you please modify it with the functionality you are using, so it reproduces the issue? This way I would be able to further investigate this matter for you.
Looking forward to hearing from you.
Thanks for the prompt reply. I think, the issue is when you have both bound and unbound fields in the xamDataGrid. The style works fine with the bound fields but not with the unbound fields.
With my WPF programming skill level, it will take me a while to to construct a sample app. It would be great if you could add 1 unbound field to your xamDataGrid and test it. BTW, I am not using ViewModel - my xamDataGrid is bound to a DataTable using (xgrdMain.DataSource = dt.DefaultView).