AvailableDataSourcesExtension Class
An extension that provides access to a list of available data sources used to provide data to the Web Dashboard.
Declaration
export class AvailableDataSourcesExtension extends DisposableObject implements IExtension
Remarks
The AvailableDataSourcesExtension
allows users to add data sources to the dashboard. Users can add data sources available in a dashboard storage when they click the Add button in the Data Sources page.
To get access to the AvailableDataSourcesExtension
settings, call the control’s findExtension(extensionName) method and pass the extension’s name as a parameter.
var ext = dashboardControl.findExtension('availableDataSources');
To disable the AvailableDataSourcesExtension
, call the unregisterExtension(extensionNames) method and pass the extension’s unique name as a parameter:
dashboardControl.unregisterExtension('availableDataSources');
You can also call the control’s option method to change the extension options.
Implements
Inherited Members
Inheritance
constructor(dashboardControl)
Initializes a new instance of the AvailableDataSourcesExtension
class.
Declaration
constructor(
dashboardControl: DevExpress.Dashboard.DashboardControl
)
Parameters
Name | Type | Description |
---|---|---|
dashboardControl | DashboardControl | A Web Dashboard control that owns the extension. |
Properties
dataSources Property
Gets data sources available to end-users for binding a dashboard to data.
Declaration
dataSources: ko.ObservableArray<DevExpress.Dashboard.Model.DataSource>
Property Value
Type |
---|
ObservableArray<DataSource> |
Remarks
The code snippet below shows how obtain available data sources:
var dataSourcesExtension = dashboardControl.findExtension('availableDataSources');
var dataSources = dataSourcesExtension.dataSources();
name Property
Specifies the unique extension name.
Declaration
name: string
Property Value
Type | Description |
---|---|
string | The unique extension name. The return value is |
Remarks
Use the availableDataSources
name in the following cases:
- Call the DashboardControl.findExtension method and pass the extension name as a parameter to access the extension.
- Call the control’s option method to change the extension options.
Warning
Do not change the unique name of the extension registered in the Web Dashboard to avoid exceptions.
selectedDataSources Property
Gets data sources currently selected in the Data Sources page.
Declaration
selectedDataSources: ko.ObservableArray<DevExpress.Dashboard.Model.DataSource>
Property Value
Type | Description |
---|---|
ObservableArray<DataSource> | An array of the DataSource objects that are currently selected data sources. |
templateName Property
Specifies a name of the knockout template used by the AvailableDataSourcesExtension.
Declaration
templateName: string
Property Value
Type | Description |
---|---|
string | A string value that specifies a name of the knockout template. |
viewModel Property
Specifies a view model used to render the AvailableDataSourcesExtension.
Declaration
viewModel: DevExpress.Dashboard.Internal.Designer.AvailableDataSourcesViewModel
Property Value
Type |
---|
AvailableDataSourcesViewModel |
Methods
loadAvailableDataSources Method
Loads available data sources used to provide data to the Web Dashboard.
Declaration
loadAvailableDataSources(): void
start Method
Contains code that is executed when you register the dashboard extension.
Declaration
start(): void
Remarks
See start to learn more.
stop Method
Contains code that is executed when you unregister the dashboard extension.
Declaration
stop(): void
Remarks
See stop to learn more.