PrintingSystemBase.EditingFieldChanged Event

Occurs each time a value of an editing field changes.

Namespace: DevExpress.XtraPrinting

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


public event EventHandler<EditingFieldEventArgs> EditingFieldChanged
Public Event EditingFieldChanged As EventHandler(Of EditingFieldEventArgs)

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.


Use the following properties to access an editing field's value:

Each time the current field value changes, the EditingFieldChanged event occurs, allowing you to respond to this action (for instance, validate input data or format the edited value). The code snippet below demonstrates how to apply the same currency format to an unbound and data-aware control.

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, see Content Editing in Print Preview.

See Also