Hi Support,
We have a WPF application in which we are using xamdatagrid (Infragistics 14.2) to show data.
Our dataset (DataSource of xamdatagrid) contains some columns that have decimal datatype and for decimal columns xamdatagrid uses XamNumericEditor.We are creating a style (TargetType
is XamNumericEditor) at runtime for those field whose datatype is decimal.In style I am using XamMaskedEditor as in given code.
String strMask=”nnnnnnnnnnnnnnnnnnnn.nnnn”;
Style s = new Style();
s.TargetType = typeof (Infragistics.Windows.Editors.XamNumericEditor);
s.Setters.Add(new Setter(XamMaskedEditor.MaskProperty, "-" +strMask));
xamDataGrid1.FieldLayouts[0].Fields[“Value1”].Settings.EditorStyle = s;
Now issue is that these field do not group value according current culture(If I remove this style,works proper)
e.g. if cell value is 247661.02 and I am in English culture it shows 247661.02 instead of 247,661.02
because default English culture digit grouping is 123,456,789.
e.g. if cell value is 247661.02 and I am in Italian culture it shows 247661,02 instead of 247.661,02
because default Italian digit grouping is 123.456.789
So can I have both masking and grouping of numbers basis of current culture.
Thanks in advance.
Hello Umesh,
Thank you for your post.
I have been looking into the code snippet that you have provided. If I understand correctly your requirements, you should use the Format property instead of mask property to achieve this functionality. I created a short sample application based on your scenario to show you how you can implement my approach. Basically in the sample I added a line in code that sets to the format property you want and tested the data with different culture settings.
Please let me know if you need any further assistance on this matter.
I am just checking if there is anything else I can do for you.
If you require any further assistance please do not hesitate to ask.