Click or drag to resize

EAPEventArgsErrorMessage Property

Sets the extention's error message for this event.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public string ErrorMessage { get; set; }

Property Value

Type: String
Remarks
In general, it is better to use the Error(String) or Cancel(String) methods to set the error message and return code in one function call.
Examples
This sample shows how to set the error message to return from the event.
public class XExt : NetQuarry.MapperExtensionKernel
{
   public override void FieldButtonClick(IField sender, EAPEventArgs e)
   {        
      if (0 == EAPUtil.ToString(sender.Fields["company_name"].Value).Length)
      {
          e.ErrorMessage = "You must provide a Company Name before executing this command.";
          e.Result = ExtResults.Error;
          return;
      }
   }
}
See Also