Parameter.MultiValue Property
Specifies whether you and end users can pass multiple values to a report parameter.
Namespace: DevExpress.XtraReports.Parameters
Assembly: DevExpress.Printing.v24.2.Core.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false | true to make a parameter multivalue; otherwise, false. |
Example
The code sample below demonstrates how to do the following:
- Create a multi-value report parameter.
- Configure a DynamicListLookUpSettings class instance to load predefined values for this parameter from a database.
- Select all predefined parameter values as defaults.
using DevExpress.XtraReports.Parameters;
// ...
// Create a parameter and set up its properties. Set the
// parameter's MultiValue property to true to make it multi-value.
var parameter1 = new Parameter() {
Name = "categories",
Description = "Categories: ",
Type = typeof(System.Int32),
MultiValue = true
};
// Create a DynamicListLookUpSettings class instance and
// configure its properties to retrieve the parameter's predefined values
// from the report's data source.
var lookupSettings = new DynamicListLookUpSettings() {
DataSource = report.DataSource,
DataMember = "Categories",
DisplayMember = "CategoryName",
ValueMember = "CategoryId"
};
// Assign the setting to the parameter's LookUpSettings property.
parameter1.LookUpSettings = lookupSettings;
// Enable the parameter's SelectAllValues property to use
// all predefined values as defaults.
parameter1.SelectAllValues = true;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the MultiValue property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
See Also