This question is locked. New answers and comments are not allowed.
Hi to all,
I have a RadComboBox controlo that has
SelectedItem={Binding MyItemSelected, ValidatesOnDataError=True, Mode=TwoWay}
MyViewModel has "ViewModelBase" class linked that keep "Error System"
If I use this method with a TextBox control, I obtain correctly "classic red waring", but with RadComboBox not appears nothing.
How can I keep this case?
I have a RadComboBox controlo that has
SelectedItem={Binding MyItemSelected, ValidatesOnDataError=True, Mode=TwoWay}
MyViewModel has "ViewModelBase" class linked that keep "Error System"
public class ViewModelBase : INotifyPropertyChanged, IDataErrorInfo { #region private variables private bool _hasErrors; #endregion #region public properties public bool HasErrors { get { return _hasErrors; } set { _hasErrors = value; NotifyPropertyChanged("HasErrors"); } } #endregion #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; protected void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } //Aggiorna lo stato di errore dell'intera entità if (propertyName != "HasErrors") HasErrors = (_dataErrors.Count > 0); } #endregion #region IDataErrorInfo Members private string _dataError = string.Empty; string IDataErrorInfo.Error { get { return _dataError; } } protected Dictionary<string, string> _dataErrors = new Dictionary<string, string>(); string IDataErrorInfo.this[string columnName] { get { if (_dataErrors.ContainsKey(columnName)) return _dataErrors[columnName]; else return null; } } protected void UpdateError(string columnName, string errorMessage) { _dataErrors[columnName] = errorMessage; } protected void RemoveErrors(string columnName) { if (_dataErrors.ContainsKey(columnName)) _dataErrors.Remove(columnName); } #endregion }If I use this method with a TextBox control, I obtain correctly "classic red waring", but with RadComboBox not appears nothing.
How can I keep this case?