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

Manual UpdateSource for RadComboBox?

2 Answers 70 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Hugh
Top achievements
Rank 1
Hugh asked on 20 Oct 2011, 12:08 AM
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 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 25 Oct 2011, 08:59 AM
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 >>

0
Hugh
Top achievements
Rank 1
answered on 18 Nov 2011, 05:36 PM
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.
Tags
ComboBox
Asked by
Hugh
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Hugh
Top achievements
Rank 1
Share this question
or