Manual UpdateSource for RadComboBox?

3 posts, 0 answers
  1. Hugh
    Hugh avatar
    16 posts
    Member since:
    Oct 2011

    Posted 19 Oct 2011 Link to this post

    I have some validations that are dependent on other controls.  As an example, let's say I have a textbox where I want the traditional tab off (lost focus) behavior of the textbox to validate ... as well as when a checkbox is selected.  In the checkbox_checked event I can do the following to force an update:

    BindingExpression be = tb.GetBindingExpression(TextBox.TextProperty);
    be.UpdateSource();
    


    I would like to do something similar with a RadComboBox.  There is a situation where I'd like to force a validation from a different component as well as doing the lost focus of the RadComboBox in question.  I've attempted something similar to the above, but to no avail:

    BindingExpression be = rcb.GetBindingExpression(Telerik.Windows.Controls.RadComboBox.TextProperty);
    be.UpdateSource();

    I've also tried: 
    Telerik.Windows.Controls.RadComboBox.SelectedItemProperty
    etc.


    It appears that no matter what property I try to grab, the returned BindindExpression is always null.  Is there a way to accomplish what I'm trying to do?
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 25 Oct 2011 Link to this post

    Hello Hugh,

    I created a very simple application that seems to work, could you check if I am not missing something?

    Greetings,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Hugh
    Hugh avatar
    16 posts
    Member since:
    Oct 2011

    Posted 18 Nov 2011 Link to this post

    Sorry about the delay.  I got pulled onto something else.


    There seems to be some config issues for me running your code, but I did parrot the design in my project ... seems to still yield the same issue.  The binding expression is null.  For my particular project we've decided to no longer attempt this, but I'm curious why this continues to be an issue.


    I did get the functionality to work by another means though.  We are using a collection view source, and calling refresh on the view will force the validation to display on the combo.  It's a bit overkill, but works in our situation.
Back to Top