The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRControl.ExpressionBindings Property

Provides access to a control's collection of expression bindings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

Declaration

[Browsable(false)]
public virtual ExpressionBindingCollection ExpressionBindings { get; }
<Browsable(False)>
Public Overridable ReadOnly Property ExpressionBindings As ExpressionBindingCollection

Property Value

Type Description
ExpressionBindingCollection

An ExpressionBindingCollection object.

Remarks

When the UserDesignerOptions.DataBindingMode property is set to DataBindingMode.Expressions or DataBindingMode.ExpressionsAdvanced, you can assign a binding expression to a report control:

See Data Binding Modes to learn more about using this feature.

The following code snippet demonstrates how to specify a custom expression for a label's XRControl.Text property. This code assumes that a report is bound to a data source containing the UnitPrice and UnitsInStock fields.

using DevExpress.XtraReports.UI;

public XtraReport1() {
    // ...
    ExpressionBinding expressionBinding = new ExpressionBinding("BeforePrint", "Text", "[UnitPrice]*[UnitsInStock]");
    xrLabel1.ExpressionBindings.Add(expressionBinding);
}
See Also