WPF: Validating SelectedItem on RadComboBox at the very beginning

2 posts, 0 answers
  1. SHING SHUN
    SHING SHUN avatar
    3 posts
    Member since:
    Jul 2012

    Posted 26 Nov 2012 Link to this post

    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~
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 29 Nov 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top