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

Null

5 Answers 83 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
UGH!!
Top achievements
Rank 1
UGH!! asked on 25 Apr 2011, 04:44 PM
Is there anyway to display a null value in the NumericUpDown control? I don't have an issue saving "null", but the control never shows anything but 0 or >0, even when it's explicity set to null.  I need it to display null and integers.  Thanks!

 

 

 

 

 

<

 

 

telerik:RadNumericUpDown x:Name="numMileage" NullValue="" Width="75" IsInteger="True" Minimum="-1" Maximum="30001" NumberDecimalDigits="0" Value="{Binding MileageRange, Mode=TwoWay, ValidatesOnExceptions=True}" Margin="0,0,10,0"></telerik:RadNumericUpDown>

 

5 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 27 Apr 2011, 01:05 PM
Hello,

You should set the NullValue property of the NumericUpDown to the needed value like this:

<telerik:RadNumericUpDown x:Name="numMileage" NullValue="null" ... />

Hope this helps.

Regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
UGH!!
Top achievements
Rank 1
answered on 27 Apr 2011, 01:48 PM
Thanks for responding ... but I've already tried that and it doesn't seem to work.  It always shows a 0 instead of null.  Any other ideas??
0
Yana
Telerik team
answered on 02 May 2011, 01:06 PM
Hi,

You can find attached a simple example which demonstrates that RadNumericUpDown shows "null" when its value is null without a problem at our side.  What is different in your case?

Best wishes,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Denis Vuyka
Top achievements
Rank 1
answered on 04 Jul 2011, 07:14 PM
I have a range 0-100 for the nullable value and have no issues displaying "NULL". However I can't find a way to reset the value to "NULL" from the control. How can user define 0-100 and "NULL" from the UI?
Thanks in advance,
Denis
0
Yana
Telerik team
answered on 05 Jul 2011, 02:11 PM
Hello Denis,

You should set IsEditable property of the NumericUpDown to true and then the user will be able to delete the text and thus set the value to NULL.

Hope this helps.

Best wishes,
Yana
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
NumericUpDown
Asked by
UGH!!
Top achievements
Rank 1
Answers by
Yana
Telerik team
UGH!!
Top achievements
Rank 1
Denis Vuyka
Top achievements
Rank 1
Share this question
or