Skip to main content

PrintingSystemBase.EditingFieldChanged Event

Occurs each time a value of an edit field changes.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public event EventHandler<EditingFieldEventArgs> EditingFieldChanged

Event Data

The EditingFieldChanged event's data class is EditingFieldEventArgs. The following properties provide information specific to this event:

Property Description
EditingField Gets an editing field whose value has been changed.

Remarks

Use the following properties to access an edit field value:

Each time the value of the current field changes, the EditingFieldChanged event occurs. This allows you to react to this action (to validate the input data or format the edited value). The code snippet below shows how to apply the same currency format to an edit field value regardless of whether a control that is an edit field is unbound or bound to data.

using DevExpress.XtraPrinting;
// ...

private void XtraReport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
    PrintingSystem.EditingFieldChanged += PrintingSystem_EditingFieldChanged;
}

void PrintingSystem_EditingFieldChanged(object sender, EditingFieldEventArgs e) {
    if (e.EditingField.Brick.TextValue != null) {
        e.EditingField.Brick.TextValueFormatString = "{0:c2}";
        e.EditingField.Brick.Text = string.Format(e.EditingField.Brick.TextValueFormatString, e.EditingField.Brick.TextValue);
    }
    else {
        e.EditingField.Brick.Text = string.Format("{0:c2}", System.Convert.ToDouble(e.EditingField.Brick.Text));
    }
}

For more information, review the following help topic: Edit Content in Print Preview.

Tip

Handle the EditingFieldChanged client-side event in an ASP.NET Web Forms application or use the EditingFieldChanged method in an ASP.NET Core reporting application.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EditingFieldChanged event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also