All docs
V21.1
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DataInspectorOptionBuilder.OnGridContentReady(String) Method

A handler for the event occurring when the widget’s content is ready and each time the content is changed.

Namespace: DevExpress.DashboardAspNetCore

Assembly: DevExpress.Dashboard.v21.1.AspNetCore.dll

Declaration

public DataInspectorOptionBuilder OnGridContentReady(
    string onGridContentReady
)

Parameters

Name Type Description
onGridContentReady String

A function that is executed when the widget’s content is ready and each time the content is changed.

Returns

Type Description
DataInspectorOptionBuilder

A reference to this instance after the operation has completed.

Remarks

The Data Inspector uses the DevExtreme DataGrid to display raw or aggregated data.

To customize the Grid widget, enable the Data Inspector (set the AllowInspectAggregatedData(Boolean) / AllowInspectRawData(Boolean) properties to true) and handle the DataGrid’s onContentReady event:

<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0;">
@(Html.DevExpress().Dashboard("dashboardControl1")
    .Width("100%")
    .Height("100%")
    .UseNeutralFilterMode(true)
    .OnBeforeRender("onBeforeRender")
    .Extensions(x => x.DataInspector(y => y.AllowInspectAggregatedData(true).AllowInspectRawData(true).OnGridContentReady("onGridContentReady")))
)
</div>

Use the event’s component property to obtain the DataGrid instance. The following code snippet shows how to change the DataGrid options (hide the “CategoryName” column):

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