We are using 2011 Q1.
I have a RadNumericUpDown setup as the following:
NullValue is not set and when inspected under a debugger in the watch window, it looks like this:
NullValue=""
My problem is this. When a user has navigated to a value like 2 using the up/down arrows, if they then highlight the value, delete it, and then hit the up arrow, the value always returns to 1.
The NullValue was previously set to 1 which I thought must be causing the problem, but after removing NullValue, the problem continued.
Basically inside the ValueChanged event and want to check if e.NewValue == null and if it is null, change e.NewValue to the previous value + 1. Is this the wrong thing to do?
I have a RadNumericUpDown setup as the following:
<
telerik:RadNumericUpDown
Margin
=
"2"
Name
=
"GotoPageValue"
IsInteger
=
"True"
Value
=
"1"
ValueChanged
=
"GotoPageValue_ValueChanged"
IsEnabled
=
"False"
IsEditable
=
"True"
></
telerik:RadNumericUpDown
>
NullValue is not set and when inspected under a debugger in the watch window, it looks like this:
NullValue=""
My problem is this. When a user has navigated to a value like 2 using the up/down arrows, if they then highlight the value, delete it, and then hit the up arrow, the value always returns to 1.
The NullValue was previously set to 1 which I thought must be causing the problem, but after removing NullValue, the problem continued.
Basically inside the ValueChanged event and want to check if e.NewValue == null and if it is null, change e.NewValue to the previous value + 1. Is this the wrong thing to do?
private void GotoPageValue_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
{
// has user cleared value manually?
if (e.NewValue == null)
{
if (_pageNumber <= GotoPageValue.Maximum)
{
// reset back to previous value
e.NewValue = _pageNumber;
}
}
FireCommandActivated(SearchResultsNavigationToolbarCommand.GotoPageValue, e);
// remember new value incase user clears value manually and hits up/down
_pageNumber = (int)e.NewValue;
}