NullValue not working

2 posts, 0 answers
  1. Lukas
    Lukas avatar
    5 posts
    Member since:
    May 2009

    Posted 04 Dec 2009 Link to this post

    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
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 07 Dec 2009 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top