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

NullValue not working

1 Answer 98 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Lukas
Top achievements
Rank 1
Lukas asked on 04 Dec 2009, 01:03 PM
Hello,
I am using Telerik RadControlls for WPF Q3 2009.

I have RadNumericUpDown defined in xaml as follows:

<Telerik:RadNumericUpDown Height="25" Width="100" CustomUnit="kg" Minimum="0" Maximum="250" ValueFormat="Numeric" NullValue="N/A" IsInteger="True"  Value="{Binding Path=Weight, Mode=TwoWay}"/>

I am binding the value to property on my ViewModel class. The property is of ?float type. It returns float or null. When it returns float number, the NumericUpDown works fine. But when the property returns null, the NumericUpDown displays "0 kg" instead of "N/A". It is impornant for my application to distinguish between 0 and null, but the NumericUpDown seems to fail at this.

Is this bug or am I missing something?

Thanks
Lukas

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 07 Dec 2009, 02:17 PM
Hello Lukas,

Thank you for your interest in our controls.

We have logged the problem in our bug tracking system and we will do our best to fix it in the next version of the control. Meanwhile, we suggest you change the type of the Weight property to double, so that everything can work as expected. You can review the attached project for more details.

If you have further questions do not hesitate to contact us again.

All the best,
Konstantina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
NumericUpDown
Asked by
Lukas
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or