Back to Devexpress

ReportDesignerBuilder.DataSourceSettings(Action<DataSourceSettings>) Method

xtrareports-devexpress-dot-aspnetcore-dot-reporting-dot-reportdesigner-dot-reportdesignerbuilder-dot-datasourcesettings-x28-system-dot-action-devexpress-dot-xtrareports-dot-configuration-dot-datasourcesettings-x29.md

latest3.1 KB
Original Source

ReportDesignerBuilder.DataSourceSettings(Action<DataSourceSettings>) Method

Specifies settings that configure the user interface related to the data sources in the Report Designer.

Namespace : DevExpress.AspNetCore.Reporting.ReportDesigner

Assembly : DevExpress.AspNetCore.Reporting.v25.2.dll

NuGet Package : DevExpress.AspNetCore.Reporting

Declaration

csharp
public ReportDesignerBuilder DataSourceSettings(
    Action<DataSourceSettings> configure
)
vb
Public Function DataSourceSettings(
    configure As Action(Of DataSourceSettings)
) As ReportDesignerBuilder

Parameters

NameTypeDescription
configureAction<DataSourceSettings>

An Action<T> delegate method that allows you to specify settings for the Web Report Designer View Model.

|

Returns

TypeDescription
ReportDesignerBuilder

A ReportDesignerBuilder that can be used to further configure the Report Designer.

|

Remarks

The following code hides the Add Data Source button and UI elements that allow the user to change and delete the data source and queries in the Field List:

csharp
@{
    var designerRender = Html.DevExpress().ReportDesigner("reportDesigner")
            .DataSourceSettings(configure => {
                configure.AllowAddDataSource = false;
                configure.AllowEditDataSource = false;
                configure.AllowRemoveDataSource = false;
            })
        .Height("100%")
        .Bind("TestReport");
    @designerRender.RenderHtml()
}

The Field List with hidden actions is shown in the following image:

See Also

ReportDesignerBuilder Class

ReportDesignerBuilder Members

DevExpress.AspNetCore.Reporting.ReportDesigner Namespace