ExpressionBinding.EventName Property
Specifies the name of the event to evaluate the expression binding within.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v20.2.dll
NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Reporting.Core
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | The event name. |
Remarks
You can create a binding expression to specify a control or parameter property. Create a ExpressionBinding object and set its properties:
EventName
- the event handler that evaluates the expression. Set this property to BeforePrint or PrintOnPage. If you omit this property, the expression is evaluated in the BeforePrint event.- PropertyName - the property that the expression applies to.
- Expression - the expression.
See Data Binding Modes for more information.
The following code example illustrates how to specify an expression to a control’s property:
// Create a label control.
XRLabel label = new XRLabel();
// Specify an expression that sets the label's Text to the current date. The expression is rendered within the BeforePrint event.
XRLabel.ExpressionBindings.Add (new ExpressionBinding("Text", "TODAY()"));
// Specify an expression that is rendered within the PrintOnPage event.
XRLabel.ExpressionBindings.Add (new ExpressionBinding("PrintOnPage","Font.Bold","true"));
See Also