The requested page is not available for the requested platform. You are viewing the content for Default platform.

Provide Custom Editors for Report Parameters

This document demonstrates how to customize an editor used to modify a report parameter value in the ASP.NET Document Viewer.


The Document Viewer displays default value editors according to report parameter types (Parameter.Type property values).

For this example to work properly, a report displayed in the Document Viewer should contain the categoryID parameter of the integer type. The Viewer automatically creates the standard ASPxSpinEdit editor for specifying this parameter's values.

You can change the minimum and maximum values of this editor by handling the ASPxDocumentViewer.CustomizeParameterEditors event. In the event handler, check the CustomizeParameterEditorsEventArgs.Parameter property to identify the required parameter and customize the parameter editor using the CustomizeParameterEditorsEventArgs.Editor property.

protected void ASPxDocumentViewer1_CustomizeParameterEditors(object sender, DevExpress.XtraReports.Web.CustomizeParameterEditorsEventArgs e)
    if (e.Parameter.Name == "categoryID")
        var spinEdit = e.Editor as ASPxSpinEdit;
        if (spinEdit == null)
        spinEdit.MinValue = 1;
        spinEdit.MaxValue = 8;

The following image demonstrates the result: