Skip to main content
All docs
V18.2

ASPxClientReportDesigner.AddParameterType(ASPxDesignerParameterType, ASPxDesignerEditorOptions) Method

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll

Declaration

public void AddParameterType(
    ASPxDesignerParameterType parameterInfo,
    ASPxDesignerEditorOptions editorOptions
)

Parameters

Name Type Description
parameterInfo ASPxDesignerParameterType

An object that provides information about a parameter type to be added.

editorOptions ASPxDesignerEditorOptions

An object that provides information about an editor used to specify parameter values in design mode.

Remarks

The AddParameterType method registers custom parameter types in the End-User Report Designer.

If you need to add a new parameter type based on an existing type, use the ASPxClientReportDesigner.GetParameterInfo and ASPxClientReportDesigner.GetParameterEditor methods to obtain information about standard parameter types and associated editors.

To remove an available parameter type from the End-User Report Designer, call the ASPxClientReportDesigner.RemoveParameterType method.

<script type="text/javascript" id="script">
    function init(s) {
        // Specify settings of a parameter type to be registered.
        var parameterInfo = {
            value: "System.Custom",
            displayValue: "Custom Integer",
            defaultValue: 0,
            specifics: "integer",
            valueConverter: function (val) {
                return parseInt(val);
            }
        };

        // Obtain a standard parameter editor for the specified type.
        var parameterEditor = s.GetParameterEditor("System.Int64")

        // Register a custom parameter type.
        s.AddParameterType(parameterInfo, parameterEditor);

        // Remove an existing parameter type.
        s.RemoveParameterType("System.DateTime");
    }
</script>

<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server" ClientInstanceName="designer">
     <ClientSideEvents Init="init"/>
</dx:ASPxReportDesigner>

For more information, see Register Custom Report Parameter Types.

See Also