I want to have a custom numeric editor.
My task is quite simple: User must have an ability to enter 1K in edit mode and value should be 1000.
ValueType is Int32 and how do I enable edit mode to accept letter K?
Hi,
I’m afraid you’re correct the spin buttons are meant to work with numeric values. So if you need to enter a character values you could create your own customize control with a text box and two image buttons, then you could manage the value incrimination and handle the character value if it were entered.
I understand how converter works.
What I do not understand:
I want user to type 1K in the editor, so I could receive value of 1000.
The problem is that user CANNOT type in "K" because numeric editor does not allow any other literals except numbers. How do I overcome this?
I cannot use xamTexteditor since seems like it does not have SpinButtons(which I need as well)
I’m just checking back to see if you have any follow-up questions. This overview may be helpful.
Overview of ValueEditor class.
http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=xamEditors_Overview_of_the_ValueEditor_Class.html
Please let me know if I can be of further assistance.
The custom converter class code is used for converting between the display text and the value. I think I gave you the wrong link for the ValueToDisplayTextConverter. Here’s the correct link.
http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=InfragisticsWPF4.Editors.v10.3~Infragistics.Windows.Editors.ValueEditor~ValueToTextConverter.html
It shows the xaml for adding the ValueToTextConverter and the ValueToDisplayTextConverter and also an example of the class code.
I don’t understand your reference to DateTimeEditor but this functionality is common to all value editors
That would include all the xamEditors.
http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=xamEditors_About_xamEditors.html
These links are ok if you are using datetime editor, they also say that 2k could be converted to 2000 and that's what we want, however if valuetype is int or double how can we type in "k"? This was an original question.