This is a migrated thread and some comments may be shown as answers.

RadMaskCurrencyInput default value

2 Answers 82 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 07 Feb 2014, 12:27 PM
Hi,

Attached shows what we got as default when using the RadMaskCurrencyInput.  My customer requests that when the user press Enter it reverts to this same state which is zero as 0.00 and the cursor placeed at the same place  but I've been unsuccessful to have the state back to default after the user have entered an amount and pressed enter.

I tried

​rmciAmount.Value = 0;
rmciAmount.Focus();


But this makes the control not having the 0 and the cursor is at the beginning.  So what do I have to do to have the default state of the control after the user entered a value and pressed enter.

Thank you

2 Answers, 1 is accepted

Sort by
0
Marc Roussel
Top achievements
Rank 2
answered on 07 Feb 2014, 12:56 PM
With the following code I get the default value all right but the cursor is placed before the dollar sign huh ?

​Dispatcher.BeginInvoke(() =>
{
     rmciAmount.Value = 0;
     rmciAmount.Focus();
});
0
Petar Mladenov
Telerik team
answered on 11 Feb 2014, 04:31 PM
Hi Marc,

Could you please try setting SelectionOnFocus property to Unchanged and let us know if this works in your scenario ? If not, you can also try setting the SelectionStart property manually in the Dispatcher body.


Regards,
Petar Mladenov
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Marc Roussel
Top achievements
Rank 2
Petar Mladenov
Telerik team
Share this question
or