Skip to main content
All docs
V24.2

Parameter.Enabled Property

Specifies whether a parameter editor is enabled or disabled in the Parameters panel.

Namespace: DevExpress.XtraReports.Parameters

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

Declaration

[DefaultValue(true)]
public bool Enabled { get; set; }

Property Value

Type Default Description
Boolean true

true, to enable a parameter editor; otherwise; false.

Example

The following example sets a parameter’s Enabled property to false to make the default value of this parameter read-only.

using DevExpress.XtraReports.Parameters;
// ...
report.Parameters["customer"].Enabled = false;

Enable = false

The example below specifies an expression for a parameter’s Enabled property to enable/disable the parameter’s editor based on a value of another parameter.

using DevExpress.XtraReports.Parameters;
// ...
using DevExpress.XtraReports.Expressions;
// ...
report.Parameters["company"].ExpressionBindings.Add(
    new BasicExpressionBinding() {
        PropertyName = "Enabled",
        Expression = "!IsNullOrEmpty(?customer)",
});

Enable/Disable a parameter editor based on a value of another parameter

See Also