RadSpinEditor- Should allow to type the limit number

1 Answer 27 Views
SpinEditor
Giri
Top achievements
Rank 1
Iron
Giri asked on 06 Apr 2022, 08:55 AM

Hello Team,
We are using the Telerik control RadSpinEditor in our windows application. we have set the Maximum Property as 1000 & Minimum Property as -100 for the SpinEditor.

Property ScreenShot : https://prnt.sc/5djfulRc2gGM

So when i click the Upper arrow & Down arrow the values are set correctly.

My Issue : When i trying to type the value on spineditor its allow to type more number of values. but it should allow only 1000. Please help us to resolve this issue. Video link added for your reference.

Video link : https://suganya-gmail.tinytake.com/df/1267028/thumbnail?type=attachments&version_no=0&file_version_no=0&thumbnail_size=preview

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Apr 2022, 11:48 AM

Hello, Giri,

Please have in mind that when RadSpinEditor loses focus, it is validated and the maximum is respected. Exactly the same behavior is observed with the standard MS NumericUpDown:

It is possible to restrict the user's input while type when the new value exceeds the limit:

            this.radSpinEditor1.SpinElement.TextChanging+=SpinElement_TextChanging;

        private void SpinElement_TextChanging(object sender, TextChangingEventArgs e)
        {
            decimal newValue = 0;
            if (decimal.TryParse(e.NewValue, out newValue))
            {
                if (newValue>this.radSpinEditor1.Maximum)
                {
                    e.Cancel = true;
                }
            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
SpinEditor
Asked by
Giri
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or