DynamicListLookUpSettings Class

发布时间:2026-01-14 10:14

In This Article

Provides settings for the storage that contains the list of predefined parameter values.

Namespace: DevExpress.XtraReports.Parameters

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

NuGet Package: DevExpress.Printing.Core

#Declaration

C# VB.NET

Assign an instance of the DynamicListLookUpSettings class to a parameter’s ValueSourceSettings property to provide a list of predefined values from a data storage. You can also set the parameter’s ValueSourceSettings property to:

a StaticListLookUpSettings class instance - to specify a static list of the parameter’s predefined values. a RangeParametersSettings class instance - to specify the nested start and end parameters for a report’s date range parameter.

Use the following properties to specify access to the data storage:

DataSource - the data source for the storage. DataMember - the data member for the storage. DataAdapter (for DataSet only) - the data adapter for the storage. ValueMember - the data member for the report parameter’s values. DisplayMember - the data member for the report parameter’s display name.

Use the SortMember and SortOrder to specify the order in which the values appear on the list.

Ensure that the listed values match the parameter’s Type - otherwise the editor’s validation rejects the value.

Users can select a value from the specified list only. However, you can specify an unlisted value for the parameter in code.

See Parameters Overview for more information.

#Example

The code sample below illustrates how to create a date parameter with a dynamic list of predefined values and filter report data by this parameter.

C# VB.NET

using DevExpress.XtraReports.Parameters; using DevExpress.XtraReports.UI; using System; using System.Collections.Generic; // ... DevExpress.DataAccess.ObjectBinding.ObjectDataSource objectDataSource = new DevExpress.DataAccess.ObjectBinding.ObjectDataSource() { Name = "ObjectDataSource1", DataSource = CreateLookups(), }; public XtraReport CreateReportWithDateParameterDynamicList() { XtraReport report = new XtraReport(); Parameter myDateParameter = new Parameter(); myDateParameter.Name = "myDateParameter"; // Sets the Visible property to true to request the parameter value from users. // Sets this property to false to apply the parameter's value that is specified in code. myDateParameter.Visible = true; myDateParameter.Type = typeof(System.DateTime); // Specifies the storage for the parameter's predefined values DynamicListLookUpSettings lookupSettings = new DynamicListLookUpSettings(); lookupSettings.DataSource = objectDataSource; lookupSettings.ValueMember = "Value"; lookupSettings.DisplayMember = "Description"; myDateParameter.ValueSourceSettings = lookupSettings; report.Parameters.Add(myDateParameter); // Filters report data by the specified parameter. report.FilterString = "GetDate([OrderDate]) >= ?myDateParameter"; return report; } static List<LookUpValue> CreateLookups() { return new List<LookUpValue>() { new LookUpValue(new DateTime(2019, 01, 01), "January 1, 2019"), new LookUpValue(new DateTime(2019, 02, 01), "February 1, 2019"), }; }

#Implements

#Inheritance

See Also

网址:DynamicListLookUpSettings Class https://m.mxgxt.com/news/view/1947450

相关内容

DynamicListLookUpSettings Class
DynamicListLookUpSettings Members
The Class Library
A Touch Of Class
梨泰院class李浩镇 梨泰院class李浩镇是谁演的
Rename (method, class, parameter) · Los Techies
lingostar class课堂
梨泰院class女主去世 梨泰院class女主是谁
梨泰院class电视剧在线观看 梨泰院class更新时间大结局是什么
StarUML之七、StarUML的Class Diagram(类图)示例

随便看看