RadNumericUpDown in GridViewDataColumn and UpdateSourceTrigger=Explicit does not like zéro values

3 posts, 0 answers
  1. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 03 Feb 2011 Link to this post


    I have a column in my grid letting me edit a numeric value like that.

    <telerik:GridViewDataColumn Header="Abscence" DataMemberBinding="{Binding Abscence}" UniqueName="Abscence" TextAlignment="Right" >
                                        <telerik:RadNumericUpDown Loaded="Editor_Loaded" Maximum="25" UpdateValueEvent="PropertyChanged"
                                        Value="{Binding Abscence, Mode=TwoWay, UpdateSourceTrigger=Explicit}" IsInteger="True" />

    I seems to me that this changed with the latest framework version as it was working before.

    The thing is that when the value in my cell is zéro it cannot be changed. Wheter I use up, down or I type new value directly.

    When I get out of the cell, I'm still at zéro.

    Now when the cell has a value différent from zéro, 20 for example, the cell behaves correctly. When I get out it keeps the value and I get notified.

    But here comes the strange... When I set the content of my cell back to zéro... it cannot be changed anymore...

    When I remove the UpdateSourceTrigger=Explicit eveything works fine. Can someone explain this to me?

    Thank you for your help,


  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 08 Feb 2011 Link to this post

    Hello John,

    I do not think it is a good idea to set the UpdateValueEvent to PropertyChanged (which means the source is updated on every keystroke) and the UpdateSourceTrigger to Explicit (which means that you should manually call the UpdateSource() method). These properties seems incompatible with each other.

    Still, I have just tried your case in a sample project and everything worked as expected. Find it attached.

    Kind regards,
    Veselin Vasilev
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 18 Feb 2011 Link to this post

    Hello Veselin,
    It's true, thank you for you sample. It doesn't have the problem...
    And my project has two many changes now for me to try to reproduce the problem.
    And anyway like you said, it's not a good idea to use both properties.
    I did remove "UpdateSourceTrigger=Explicit" and everything worked fine.

    I'll come back to you in case I get the problem again.
    Thank you for your help,
Back to Top