Back to Devexpress

DataInspectorExtensionOptions Interface

dashboard-js-devexpress-dot-dashboard-dea5ae2b.md

latest8.7 KB
Original Source

DataInspectorExtensionOptions Interface

Provides options for customizing the DataInspectorExtension.

Declaration

ts
export interface DataInspectorExtensionOptions

Remarks

See the following topic for information on how to use the DashboardControl’s client-side API: Extensions Overview.

For more information on how to enable and customize Data Inspector, refer to the following articles based on the platform:

You can enable export to Excel. Refer to the following topic for details: Export Data.

See Also

Data Inspector

Properties

allowInspectAggregatedData Property

Specifies whether to display aggregated data in the Data Inspector.

Declaration

ts
allowInspectAggregatedData?: boolean

Property Value

TypeDescription
boolean

true , to display aggregated data in the Data Inspector; otherwise, false.

|

Remarks

Set the allowInspectRawData property to true to display raw data in the Data Inspector.

When only one property is set to true, the window contains a single grid with raw or aggregated data, depending on what property is enabled. The window caption displays the dashboard item caption text and the inspected item type (raw or aggregated) in parentheses.

When both properties are set to true, the window contains two grids with raw and aggregated data and allows a user to switch between them. The window caption displays the dashboard item caption text.

For more information on Data Inspector, refer to the following article: Manage Data Inspector in the Dashboard Control for JavaScript Applications.

allowInspectRawData Property

Specifies whether to display raw data in the Data Inspector.

Declaration

ts
allowInspectRawData?: boolean

Property Value

TypeDescription
boolean

true , to display raw data in the Data Inspector; otherwise, false.

|

Remarks

Set the allowInspectAggregatedData property to true to display aggregated data in the Data Inspector.

When only one property is set to true, the window contains a single grid with raw or aggregated data, depending on what property is enabled. The window caption displays the dashboard item caption text and the inspected item type (raw or aggregated) in parentheses.

When both properties are set to true, the window contains two grids with raw and aggregated data and allows a user to switch between them. The window caption displays the dashboard item caption text.

For more information on Data Inspector, refer to the following article: Manage Data Inspector in the Dashboard Control for JavaScript Applications.

onDialogHidden Property

A handler for the event that occurs when the Data Inspector dialog is hidden.

Declaration

ts
onDialogHidden?: (args: DataInspectorDialogArgs) => void

Property Value

TypeDescription
(args: DataInspectorDialogArgs) => void

A function that is executed when the export dialog is hidden.

|

onDialogShowing Property

A handler for the event that occurs before the Data Inspector dialog is shown.

Declaration

ts
onDialogShowing?: (args: DataInspectorDialogArgs) => void

Property Value

TypeDescription
(args: DataInspectorDialogArgs) => void

A function that is executed before the Data Inspector dialog is shown.

|

onDialogShown Property

A handler for the event that occurs after the Data Inspector dialog is shown.

Declaration

ts
onDialogShown?: (args: DataInspectorDialogArgs) => void

Property Value

TypeDescription
(args: DataInspectorDialogArgs) => void

A function that is executed after the Data Inspector dialog is shown.

|

onGridContentReady Property

A handler for the event that occurs after the Grid widget’s content is loaded.

Declaration

ts
onGridContentReady?: (args: DataInspectorGridArgs) => void

Property Value

TypeDescription
(args: DataInspectorGridArgs) => void

A function that is executed after the Grid widget’s content is loaded.

|

Remarks

The Data Inspector uses the DevExtreme DataGrid to display raw or aggregated data. Use the component property to obtain the DataGrid instance. The following code snippet shows how to change the DataGrid options (hide the “CategoryName” column):

javascript
function onGridContentReady(args) {
    args.component.columnOption("CategoryName", "visible", false);
}

onGridInitialized Property

A handler for the event that occurs before the Grid widget’s content is loaded.

Declaration

ts
onGridInitialized?: (args: DataInspectorGridArgs) => void

Property Value

TypeDescription
(args: DataInspectorGridArgs) => void

A function used in JavaScript frameworks to save the widget instance.

|

Remarks

The Data Inspector uses the DevExtreme DataGrid to display raw or aggregated data. Use the component property to obtain the dxGrid instance. The following code snippet shows how to change the DataGrid options (enable export to Excel):

js
extensions:{
    "dataInspector": {
        allowInspectAggregatedData: true,
        allowInspectRawData: true,
        onGridInitialized: onGridInitialized
    }
}
js
function onGridInitialized(args) {
    args.component.option({
        export: {
            enabled: true
        }
    });
}

Note that client-side export in the DataGrid widget requires the ExcelJS v4+ and FileSaver third-party libraries.