Click or drag to resize

EAPEventArgsCancel Method

Sets the extention's result code and error message for this event. The result code is set to ExtResultsExtResults.Cancel.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public void Cancel(
	string message
)

Parameters

message
Type: SystemString
The error message
Remarks
Note that this method does not stop execution of the current function call. The only distinction between an Error return and a Cancel return is the return value set.
Examples
This sample shows how to use the Cancel method.
public class XExt : NetQuarry.MapperExtensionKernel
{
   public override void FieldButtonClick(IField sender, EAPEventArgs e)
   {        
      if (0 == EAPUtil.ToString(sender.Fields["company_name"].Value).Length)
      {
          e.Cancel("You must provide a Company Name before executing this command.");
          return;
      }
   }
}
See Also