Back to Devexpress

DataSourceOptionsContainer.ObjectDataSourceLoadingBehavior Property

windowsforms-devexpress-dot-dataaccess-dot-ui-dot-design-dot-datasourceoptionscontainer.md

latest7.8 KB
Original Source

DataSourceOptionsContainer.ObjectDataSourceLoadingBehavior Property

Specifies whether to trust the object data sources available in the end-user application.

Namespace : DevExpress.DataAccess.UI.Design

Assembly : DevExpress.DataAccess.v25.2.UI.dll

NuGet Package : DevExpress.DataAccess.UI

Declaration

csharp
[DefaultValue(DocumentLoadingBehavior.Prompt)]
public DocumentLoadingBehavior ObjectDataSourceLoadingBehavior { get; set; }
vb
<DefaultValue(DocumentLoadingBehavior.Prompt)>
Public Property ObjectDataSourceLoadingBehavior As DocumentLoadingBehavior

Property Value

TypeDefaultDescription
DocumentLoadingBehaviorPrompt

A DocumentLoadingBehavior enumeration value.

|

Available values:

NameDescription
Prompt

Ask for an end-user’s permission on every attempt to load an object data source in an application.

| | LoadAsIs |

Allow loading any object data sources.

| | LoadSafely |

Load object data sources in a safe mode (with their data member and data source settings cleared).

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to ObjectDataSourceLoadingBehavior
WinForms ControlsSpreadsheetControlOptions

.DataSourceOptions .ObjectDataSourceLoadingBehavior

| | Dashboard | DashboardDesigner |

.DataSourceOptions .ObjectDataSourceLoadingBehavior

| | DashboardViewer |

.DataSourceOptions .ObjectDataSourceLoadingBehavior

| | IDashboardControl |

.DataSourceOptions .ObjectDataSourceLoadingBehavior

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the ObjectDataSourceLoadingBehavior property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-designer-bind-a-dashboard-to-a-list-object/CS/Dashboard_BindingToList/Form1.cs#L11

csharp
InitializeComponent();
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DocumentLoadingBehavior.LoadAsIs;
dashboardViewer1.CustomizeDashboardTitle += DashboardViewer1_CustomizeDashboardTitle;

winforms-dashboard-async-mode-designer-data-loading/CS/DashboardDesignerAsyncModeExample/Form1.cs#L14

csharp
dashboardDesigner1.AsyncMode = true;
dashboardDesigner1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs;
dashboardDesigner1.DataLoading += DashboardDesigner1_DataLoading;

winforms-dashboard-apply-conditional-formatting-to-grid-cells/CS/Dashboard_ConditionalFormatting_Grid/DateOccurringForm.cs#L9

csharp
dashboardViewer1.AsyncDataLoading += OnDashboardViewerAsyncDataLoading;
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs;

winforms-dashboard-window-function-calc-field/CS/DesignerForm1.cs#L11

csharp
dashboardDesigner.CreateRibbon();
dashboardDesigner.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs;
dashboardDesigner.LoadDashboard(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\dashboard1.xml"));

winforms-dashboard-designer-bind-a-dashboard-to-a-list-object/VB/Dashboard_BindingToList/Form1.vb#L13

vb
InitializeComponent()
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DocumentLoadingBehavior.LoadAsIs
AddHandler dashboardViewer1.CustomizeDashboardTitle, AddressOf DashboardViewer1_CustomizeDashboardTitle

winforms-dashboard-async-mode-designer-data-loading/VB/DashboardDesignerAsyncModeExample/Form1.vb#L13

vb
dashboardDesigner1.AsyncMode = True
dashboardDesigner1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs
AddHandler dashboardDesigner1.DataLoading, AddressOf DashboardDesigner1_DataLoading

winforms-dashboard-apply-conditional-formatting-to-grid-cells/VB/Dashboard_ConditionalFormatting_Grid/DateOccurringForm.vb#L12

vb
AddHandler dashboardViewer1.AsyncDataLoading, AddressOf OnDashboardViewerAsyncDataLoading
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs

winforms-dashboard-window-function-calc-field/VB/DesignerForm1.vb#L13

vb
dashboardDesigner.CreateRibbon()
dashboardDesigner.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs
dashboardDesigner.LoadDashboard(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\..\dashboard1.xml"))

See Also

DevExpress Reporting - Security Considerations

DataSourceOptionsContainer Class

DataSourceOptionsContainer Members

DevExpress.DataAccess.UI.Design Namespace