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
425
Object source + IDataErrorInfo + Form's validateChildren
posted

Hi All

I want to check my UltraGrid has error or not, and set e.Cancel accordingly. but I have no idea how to do this.

my form submit button calls form.validateChildren(), but i dont know where to set the e.Cancel.

i use objects as datasource, and my object class implemented IDataErrorInfo, and my UltraGrid is showing the error icon accordingly.

this is logically what i want

UltraGrid_validating(object sender, CancelEventArg e){

  if(this.UltraGrid.hasError){

e.Cancel = true;

  errorMessageList.Add( this.UltraGrid.ErrorMessage);

} else{e.Cancel = false;}

}

 

Regards

Bryan

Parents Reply Children
No Data