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

Radspineditor values range

1 Answer 104 Views
SpinEditor
This is a migrated thread and some comments may be shown as answers.
Oscar
Top achievements
Rank 1
Oscar asked on 01 Dec 2016, 08:09 AM
I have a radspineditor, with a minimum of 1 and a maximum of 100. I want to display a messagebox if the user enters a value outside that range. How do I capture that value? That is, if the user enters 110 with the keyboard, display the messagebox.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 01 Dec 2016, 10:56 AM
Hi Oscar,

Thank you for writing.

Currently, you can use the TextChanged event to achieve this:
private void RadSpinEditor1_TextChanged(object sender, EventArgs e)
{
    var value = decimal.Parse(radSpinEditor1.Text);
    if (value > radSpinEditor1.Maximum)
    {
        RadMessageBox.Show("Value is larger than the maximum");
    }
}

I hope this will be useful.

Regards,
Dimitar
Telerik by Progress
Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
Tags
SpinEditor
Asked by
Oscar
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or