DynamicListLookUpSettings.ValueMember Property
The name of the field that stores the report parameter‘s values.
Namespace: DevExpress.XtraReports.Parameters
Assembly: DevExpress.Printing.v24.1.Core.dll
NuGet Package: DevExpress.Printing.Core
Declaration
[TypeConverter("DevExpress.XtraReports.Design.DataFieldTypeConverter,DevExpress.XtraReports.v24.1, Version=24.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[XtraSerializableProperty]
public string ValueMember { get; set; }
Property Value
Type | Description |
---|---|
String | A String value. |
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.
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"),
};
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ValueMember 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.