Back to Devexpress

ReportDesignerParameterEditingSettings Class

corelibraries-devexpress-dot-xtrareports-dot-web-dot-reportdesigner-dot-datacontracts-ca2118b0.md

latest5.0 KB
Original Source

ReportDesignerParameterEditingSettings Class

Contains settings that configure user interface elements related to the editing of parameters, parameter groups, and parameter separators in the Web Report Designer.

Namespace : DevExpress.XtraReports.Web.ReportDesigner.DataContracts

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[DataContract]
public class ReportDesignerParameterEditingSettings :
    SerializableSettingsBase
vb
<DataContract>
Public Class ReportDesignerParameterEditingSettings
    Inherits SerializableSettingsBase

The following members return ReportDesignerParameterEditingSettings objects:

Remarks

Use the following properties to change the editing settings of parameters, parameter groups, and parameter separators in the Web Report Designer:

AllowEditParameterCollectionHides the UI elements that allow users to add and delete parameters.AllowEditParameterGroupsHides the UI elements that allow users to add and delete parameter groups.AllowEditParameterSeparatorsHides the UI elements that allow users to add and delete parameter separators.AllowEditPropertiesAllows you to disable all property editors for parameters and parameter groups.AllowEditParameterCollectionHides the UI elements that allow users to add and delete parameters.AllowReorderParametersHides UI elements that allow users to reorder parameters, parameter groups, and parameter separators.

The following code snippet makes parameters, parameter groups, and separators read-only for users (users cannot add or delete parameters/groups/separators, edit their properties, and reorder them). Note that the techniques vary depending on whether you bind the Web Report Designer to a report object (or by a report name) or to a ReportDesignerModel object.

cshtml
@{
    var designerRender = Html.DevExpress().ReportDesigner("reportDesigner")
        .Height("100%")
        .ParameterEditingSettings(configure => {
            configure.AllowEditParameterCollection = false;
            configure.AllowEditParameterSeparators = false;
            configure.AllowEditParameterGroups = false;
            configure.AllowEditProperties = false;
            configure.AllowReorderParameters = false;})
        .Height("100%")
        .Bind("TestReport");
    @designerRender.RenderHtml()
}
cs
public IActionResult ReportDesigner(
    [FromServices] IReportDesignerModelBuilder reportDesignerModelBuilder, 
    [FromQuery] string reportName) {
    // ...
    var designerModel = reportDesignerModelBuilder
        .Report(reportName)
        .BuildModel();
    designerModel.ParameterEditingSettings.AllowEditParameterCollection = false;
    designerModel.ParameterEditingSettings.AllowEditParameterGroups = false;
    designerModel.ParameterEditingSettings.AllowEditParameterSeparators = false;
    designerModel.ParameterEditingSettings.AllowEditProperties = false;
    designerModel.ParameterEditingSettings.AllowReorderParameters = false;
    return View(designerModel);
}

Inheritance

Object DevExpress.Utils.SerializableSettingsBase ReportDesignerParameterEditingSettings

See Also

ReportDesignerParameterEditingSettings Members

DevExpress.XtraReports.Web.ReportDesigner.DataContracts Namespace