windowsforms-devexpress-dot-dataaccess-dot-ui-dot-design-dot-datasourceoptionscontainer.md
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
[DefaultValue(DocumentLoadingBehavior.Prompt)]
public DocumentLoadingBehavior ObjectDataSourceLoadingBehavior { get; set; }
<DefaultValue(DocumentLoadingBehavior.Prompt)>
Public Property ObjectDataSourceLoadingBehavior As DocumentLoadingBehavior
| Type | Default | Description |
|---|---|---|
| DocumentLoadingBehavior | Prompt |
A DocumentLoadingBehavior enumeration value.
|
Available values:
| Name | Description |
|---|---|
| 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).
|
You can access this nested property as listed below:
| Library | Object Type | Path to ObjectDataSourceLoadingBehavior |
|---|---|---|
| WinForms Controls | SpreadsheetControlOptions |
.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.
InitializeComponent();
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DocumentLoadingBehavior.LoadAsIs;
dashboardViewer1.CustomizeDashboardTitle += DashboardViewer1_CustomizeDashboardTitle;
dashboardDesigner1.AsyncMode = true;
dashboardDesigner1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs;
dashboardDesigner1.DataLoading += DashboardDesigner1_DataLoading;
dashboardViewer1.AsyncDataLoading += OnDashboardViewerAsyncDataLoading;
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs;
winforms-dashboard-window-function-calc-field/CS/DesignerForm1.cs#L11
dashboardDesigner.CreateRibbon();
dashboardDesigner.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs;
dashboardDesigner.LoadDashboard(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\dashboard1.xml"));
InitializeComponent()
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DocumentLoadingBehavior.LoadAsIs
AddHandler dashboardViewer1.CustomizeDashboardTitle, AddressOf DashboardViewer1_CustomizeDashboardTitle
dashboardDesigner1.AsyncMode = True
dashboardDesigner1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs
AddHandler dashboardDesigner1.DataLoading, AddressOf DashboardDesigner1_DataLoading
AddHandler dashboardViewer1.AsyncDataLoading, AddressOf OnDashboardViewerAsyncDataLoading
dashboardViewer1.DataSourceOptions.ObjectDataSourceLoadingBehavior = DevExpress.DataAccess.DocumentLoadingBehavior.LoadAsIs
winforms-dashboard-window-function-calc-field/VB/DesignerForm1.vb#L13
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