DxReportViewer.OnCustomizeParameterLookUpSource Event
Occurs when a lookup editor is created for a report parameter. Allows you to supply lookup values.
Namespace: DevExpress.Blazor.Reporting
Assembly: DevExpress.Blazor.Reporting.v24.2.Viewer.dll
NuGet Package: DevExpress.Blazor.Reporting.Viewer
Declaration
[Parameter]
public EventCallback<CustomizeParameterLookUpSourceEventArgs> OnCustomizeParameterLookUpSource { get; set; }
Event Data
The OnCustomizeParameterLookUpSource event's data class is CustomizeParameterLookUpSourceEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
LookUpValues | A collection of values shown in the parameter lookup editor. |
ParameterModel | Provides access to the settings specified for a report parameter. |
Remarks
The OnCustomizeParameterLookUpSource event allows you to modify lookup values displayed in a parameter editor. The following code fills the lookup editor for the parameter1
report parameter with two lookup values:
@using DevExpress.XtraReports.Parameters;
<DxReportViewer @ref="reportViewer" OnCustomizeParameterLookUpSource="OnCustomizeParameterLookUpSource">
</DxReportViewer>
@code {
DxReportViewer reportViewer;
void OnCustomizeParameterLookUpSource(CustomizeParameterLookUpSourceEventArgs e)
{
if (e.ParameterModel.Name == "parameter1")
e.ParameterModel.LookUpValues = new LookUpValueCollection()
{
new LookUpValue("username1","name1"),
new LookUpValue("username2","name2")
};
}
}
See Also