Skip to main content
A newer version of this page is available. .

Data Inspector

  • 5 minutes to read

Data Inspector is a dialog window that contains two grids that display raw and aggregated data. The user can switch from one grid to another with the radio group located at the window top.

Overview

To invoke the Data Inspector window, click the “Inspect Data” button inspect-data-WinForms in the dashboard item caption or select the “Inspect Data” context menu item.

The “Inspect Data” button and menu item are initially hidden. To show them, set one of the following properties (or both) to true:

Platform Property
WinForms Dashboard Viewer DashboardViewer.AllowInspectAggregatedData
DashboardViewer.AllowInspectRawData
WinForms Dashboard Designer DashboardDesigner.AllowInspectAggregatedData
DashboardDesigner.AllowInspectRawData
WPF Dashboard Control DashboardControl.AllowInspectAggregatedData
DashboardControl.AllowInspectRawData
Web Forms Dashboard Control ASPxDashboard.AllowInspectAggregatedData
ASPxDashboard.AllowInspectRawData
MVC Dashboard Control DashboardExtensionSettings.AllowInspectAggregatedData
DashboardExtensionSettings.AllowInspectRawData
ASP.NET Core Dashboard Control DataInspectorOptionBuilder.AllowInspectAggregatedData
DataInspectorOptionBuilder.AllowInspectRawData
HTML JavaScript Dashboard DataInspectorExtensionOptions.allowInspectAggregatedData
DataInspectorExtensionOptions.allowInspectRawData

When both properties are true, each dashboard item caption contains the “Inspect Data” button. Click the button to invoke the Data Inspector window that contains two grids with raw and aggregated data. The window caption displays the dashboard item caption text.

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

The Data Inspector can display hidden measures and does not display hidden dimensions. You can add data members to the Hidden Measures section (WinForms / Web) to display them only in the Data inspector and do not show in the visual data representation.

Aggregated (Displayed) Data

The data shown as Aggregated is retrieved from the dashboard item’s data storage that is the MultiDimensionalData object.

The columns are:

  • Dimensions, except the Sparkline.
  • Measures. A list of dimensions does not include unbound measures (the measures without a DataMember, such as Totals and the number of points in a Cluster).
  • The Sparkline data item is displayed as a column whose values are strings that consist of comma-separated pairs “SparklineArgumentValue - MeasureValue”.
  • The Delta data item is displayed as two measure columns that used to calculate the difference (target and actual values).

A column that contains a byte array byte[] (for example, images) displays a string “[Object]“.

Raw Data

Raw data is the dashboard item’s underlying data. The column name is a name of the corresponding data source field.

For delta data item, the Raw Data Grid displays two columns that used to calculate the difference (target and actual values).

In OLAP, the maximum number of rows that returns from a drill-through query depends on the DefaultDrillthroughMaxRows property. The default value is 10000 rows.

Export Data

Data Inspector allows you to export data to different formats.

In desktop, use the Print Preview dialog to export data to the desired format (Excel, PDF, Image or other).

In Web, you can enable export to Excel. For this, enable export options of the underlying DevExtreme DataGrid instance that is used to display raw or aggregated data.

Handle the DataInspectorExtensionOptions.onGridInitialized event and use the DataInspectorGridArgs.component property to obtain the dxGrid instance. Then set the dxDataGrid.Configuration.export.enabled option to true.

extensions:{
    "data-inspector": {
        allowInspectAggregatedData: true,
        allowInspectRawData: true,
        onGridInitialized: onGridInitialized
    }
}

As a result, the Data Inspector displays the Export to Excel button:

The ASP.NET and ASP.NET MVC platforms have some specifics when you work with underlying widgets. See the complete examples on GitHub:

API

Call the ShowDataInspector method to invoke the Data Inspector dialog:

Platform Method
WinForms Dashboard Viewer DashboardViewer.ShowDataInspector
WinForms Dashboard Designer DashboardDesigner.ShowDataInspector
WinForms Dashboard Viewer (async) DashboardViewer.ShowDataInspectorAsync
WinForms Dashboard Designer (async) DashboardDesigner.ShowDataInspectorAsync
WPF Dashboard Control DashboardControl.ShowDataInspector
Web Dashboard Control DataInspectorExtension.showDataInspector

To customize the Data Inspector dialog, use the following API:

WinForms

API Description
DashboardViewer.DataInspectorFormLoad Occurs before the Data Inspector window displays. Allows you to access the window’s grid controls and change their settings.
DashboardViewer.DataInspectorFormClosing Occurs before the Data Inspector window closes. Allows you to access the window’s grid controls.
DashboardDesigner.DataInspectorFormLoad Occurs before the Data Inspector window displays. Allows you to access the window’s grid controls and change their settings.
DashboardDesigner.DataInspectorFormClosing Occurs before the Data Inspector window closes. Allows you to access the window’s grid controls.
DataInspectorFormLoadEventArgs.AllowExportAggregatedData Gets or sets whether end users can export aggregated data from the Data Inspector.
DataInspectorFormLoadEventArgs.AllowExportRawData Gets or sets whether end users can export raw data from the Data Inspector.

WPF

API Description
DataInspectorTemplate Allows you to specify a custom Data Inspector dialog template.
DataInspectorStyle Gets or sets the style applied to the Data Inspector window. This is a dependency property.

Web

API Description
DataInspectorExtensionOptions.onGridContentReady A handler for the event occurring after the Grid widget’s content is loaded.
DataInspectorExtensionOptions.onGridInitialized A handler for the event occurring before the Grid widget’s content is loaded.
DataInspectorExtensionOptions.onDialogHidden A handler for the event occurring when the Data Inspector dialog is hidden.
DataInspectorExtensionOptions.onDialogHidden A handler for the event occurring before the Data Inspector dialog is shown.
DataInspectorExtensionOptions.onDialogHidden A handler for the event occurring after the Data Inspector dialog is shown.