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
40
Infragistics.Win.UltraWinEditors.UltraCurrencyEditor (automatic cursor move)
posted

Version 8.1 for WinForms

Scenario:

1. Text box contains value: 1234.56

2. User clicks inside editor to modify the value. He clicks inbetween the 2 and the 3  (e.g. 12|34.56) so the cursor is blinking to the right of the 2

3. User enters a decimal character (.)

4. The cursor automatically moves over to the right of the decimal point, assuming that this is what the user is trying to do.

Questions:

1. Is there a way to prevent the automatic moving of the cursor?

2. Can the UltraCurrencyEditor NOT format as you type? Can i change the behavior to format after the control loses focus? Or do I have to switch to another control?

 

Thank you so much!

 

 

Parents
No Data
Reply
  • 37774
    Verified Answer
    posted

    This sounds like the standard behavior of the UltraCurrencyEditor, which is basically a specialized UltraMaskedEditor, and I'm not aware of any way to change the behavior of the cursor, since by pressing '.' the user is indicating that they're ready to type into the decimal portion.  If you don't want to have the mask, and therefore the edit-mode formatting that you're referring to, you could try simply using an UltraTextEditor.  The problem with this approach is that you lose the ability to use a .NET format string, since you cannot apply a format to a string type in .NET.  The only way around that would be to use a DataFilter on the UltraTextEditor and convert the string to a decimal and then call ToString on it with the appropriate format string.  Should you decide to go the route of a DataFilter, there is an example in the KB.

    -Matt

Children
No Data