Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
Validation for XamComboEditor
posted

Hi Infragistics,

I am currently doing validation on ComboBox elements by binding it to a property in the ViewModel and then doing an UpdateSource() call. This works perfectly fine.

However, I was not able to do the equivalent for the XamComboEditor. I can send you more code if necessary.

Any suggestions? The XamComboEditor loads up a list of user names from a SQL datasource as a collection of <T> objects.

This is what the UI looks like currently. The comboBox lights up when I try to submit without putting in anything.

I am using code like this in the code behind. how do I do the equivalent for a XamComboEditor?

cboReccomendedAmount. GetBindingExpression (ComboBox.SelectedValueProperty) . UpdateSource();

and my properties 

public string SelectedRecAmount
{
       get
       {
              return _selectedRecAmount;
       }
       set
       {
              if (string.IsNullOrEmpty(value))
              {
              throw new Exception("Please Select a Recommended Amount");
               }
               _selectedRecAmount = value;
               OnNotifyPropertyChanged("SelectedRecAmount");
        }
}

thanks much,

-Steven