Skip to main content
All docs
V24.1

Parameter.Enabled Property

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

Namespace: DevExpress.XtraReports.Parameters

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

NuGet Package: DevExpress.Printing.Core

Declaration

[TypeConverter(typeof(BooleanTypeConverter))]
[XtraSerializableProperty]
public bool Enabled { get; set; }

Property Value

Type Description
Boolean

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