Back to Devexpress

DataSourceSettings Class

corelibraries-devexpress-dot-xtrareports-dot-configuration.md

latest2.3 KB
Original Source

DataSourceSettings Class

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

Namespace : DevExpress.XtraReports.Configuration

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[DataContract]
public class DataSourceSettings
vb
<DataContract>
Public Class DataSourceSettings

The following members return DataSourceSettings objects:

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:

Review the ReportDesignerSettingsBase class description for more examples.

Inheritance

Object DataSourceSettings

See Also

DataSourceSettings Members

DevExpress.XtraReports.Configuration Namespace