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

WPF: Validating SelectedItem on RadComboBox at the very beginning

1 Answer 133 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
SHING SHUN
Top achievements
Rank 1
Iron
SHING SHUN asked on 27 Nov 2012, 02:19 AM
Hi,

I am trying to setup a form that will validate whether a combo box (as well as other inputs) is filled or not.  It seems that the Binding of RadComboBox only happens after PropertyChanged or LostFocus.  What if the input hasn't been touched by the user at all - hence the binding couldn't be triggered?

I can't seems to get it to work.  Please help.

Cheers~

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 29 Nov 2012, 11:47 AM
Hi,

To force the validation before any selection is made in the ComboBox control you could set the SelectedValue when you first load the ViewModel or the control to string.Empty.

Hope this helps.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ComboBox
Asked by
SHING SHUN
Top achievements
Rank 1
Iron
Answers by
Vladi
Telerik team
Share this question
or