I have TextColumn which is shows numeric values. I am using FormatString="{}{0:N0}" to show to number in a format but when I get into the edit mode, textbox does not show number format.
How can preserve formating for edit mode?
How can restrict user to just enter numeric values with commas if possible?
Hello Gajender,
Thank you for your question.
In order to display this string format when you are in edit mode, you should be set the Field.Settings.EditorStyle to XamNumericEditor.
I am attaching you a sample application (Grid_bind_Field_label.zip). In case that you want to change the mask of this editor, please refer to the following help link: http://help.infragistics.com/NetAdvantage/WPF/2013.1/CLR4.0/?page=xamEditors_Masks.html
Best regards,
Anatoli Iliev
I am using XamGrid and not XamDataGrid. Please provide the sample for XamGrid.
Thank you for your reply and the clarification on the matter. I have looked into your requirement and since you are using XamGrid and you wish to enable editing and to have the same format in edit mode, I can suggest using TempalteColumn and define ItemTempalte and EditorTempalte. In the ItemTempalte you can add a TextBlock and set the StringFormat to format the value while not in edit mode and in the EditorTempalte, you can add a XamNumericEditor and you can set its Mask property, which allows to set the format in edit mode. I have modified the sample application that Anatoli has created for you, to show how you can implement this approach.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
thanks for yu answer. TemplateColumn can solve many similar issues but I want to use the TextColumnm which is much lighter to use.
We are still following this forum thread.
Please do not hesitate to cotnact us, if you have any other questions with this matter.
Thanks.