Edit

Share via


DataDOMEvent.ReturnMessage Property

Definition

Gets or sets the error message that will be returned if the data validation event is not successful.

public:
 property System::String ^ ReturnMessage { System::String ^ get(); void set(System::String ^ value); };
public string ReturnMessage { get; set; }
member this.ReturnMessage : string with get, set
Public Property ReturnMessage As String

Property Value

Examples

In the following example, the ReturnMessage property of the DataDOMEventObject object is used to display a message to the user if the data validation for the XML DOM node fails:

public void qtty_OnBeforeChange(DataDOMEvent e)
 {
  if (e.NewValue.ToString() == "")
  {
   e.<span class="label">ReturnMessage</span> = "You must supply a value for this field.";
   e.ReturnStatus = false;
   return;
  }
}

Remarks

Used in conjunction with the ReturnStatus property, the ReturnMessage property displays a message box to the user with the specified text message.

Important: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Applies to