Updating Binding doesn't update control if control has focus

3 posts, 0 answers
  1. Alan
    Alan avatar
    25 posts
    Member since:
    Jan 2013

    Posted 10 May 2013 Link to this post

    While the RadNumericUpDown control still has the focus from a previous edit,
    if I update what it is bound to in code behind and RaisePropertyChanged for the property,
    the RadNumericUpDown does not get updated.

    If I first take the focus off of RadNumericUpDown on to another control before changing the bound value in the same way
    as above the same RadNumericUpDown does get updated.

    Some questions:
      * Is this behavour expected?
      * How can I disable/workaround this?

    Below is how I am defining the control and binding in XAML:
    <controls:RadNumericUpDown x:Name="XTextBox" Value="{Binding GraphicalItem.Rect.X}" UpdateValueEvent="PropertyChanged" Minimum="{Binding GraphicalItem.Rect.MinX}" Maximum="{Binding GraphicalItem.Rect.MaxX}" LargeChange="{Binding LargeCoordinateChange}" SmallChange="{Binding SmallCoordinateChange}" BorderBrush="#FFCBCBCB" Margin="3,2,0,2" HorizontalAlignment="Right" BorderThickness="1" Background="{x:Null}" Height="20" MinWidth="40" Padding="1,1,2,1"/>


  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 15 May 2013 Link to this post

    Hi Alan,

    You mean that the ValueChanged event is not fired?
    I have tested in a simple project, in which on a Timer tick I am updating the property bound to the Numeric's value, and it works as expected: the value is updating and the ValueChanged event i fired, but the text is not updated until it looses focus.
    Could you please send us a sample project, where this issue can be reproduced? In that way we will be able to debug it locally and find the source of the problem.

    Looking forward to your reply.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Alan
    Alan avatar
    25 posts
    Member since:
    Jan 2013

    Posted 15 May 2013 Link to this post

    I wanted the text to update, even when focus was still on control.
    I noticed that you have already given an answer and fix to this here:

    I tried this and it works for me.
    Issue closed!

Back to Top