Dashboard provides the Drill-Down feature, which allows end-users to change the detail level of data displayed in a dashboard item. Drill-Down enables users to drill down to display detail data, or drill up to view more general information.
The image below shows how to drill down in the Chart dashboard item to view detailed information for the Mobile bar column:
The following dashboard items support the Drill-Down feature:
Drill-down requires that the data section in the dashboard item's Binding menu contains several dimensions...
... or a hierarchy data item (in OLAP mode).
To be able to change the detail level of data, go to the dashboard item's Interactivity menu and enable the Drill Down option.
The following table lists members you can use to perform drill-down / drill-up in code.
Obtains values that can be used to perform drill-down.
Performs a drill-down into the required element by its value.
Performs a drill-up for the specified dashboard item.
An event that occurs when a drill-down/drill-up is performed.
Allows you to get the drill-down action performed in the dashboard item.
Allows you to obtain values from the current drill-down hierarchy.
The image below illustrates how drill-down works. The action and values property allows you to get information about an accomplished action:
In OLAP mode, the ASPxClientDashboardItemDrillDownStateChangedEventArgs.Values/ ItemDrillDownStateChangedEventArgs.values properties return unique names instead of values.
The following example demonstrates how to perform a drill-down in ASPxDashboard on the client side.
In this example, the ASPxClientDashboard.PerformDrillDown method is used to perform a drill-down for a specified row in a Grid dashboard item. The dxSelectBox widget contains categories for which a drill-down can be performed. These categories are obtained using the ASPxClientDashboard.GetAvailableDrillDownValues method. Select a required category and click the Perform Drill-Down button to perform a drill-down by the selected category.
When the Grid displays a list of products (the bottom-most detail level), you can only perform a drill-up action that returns you to the top detail level. The ASPxClientDashboard.PerformDrillUp method is called to do this.
A complete sample project is available at https://github.com/DevExpress-Examples/aspxdashboard-how-to-perform-a-drill-down-in-code-t495048.
Dim access97Params As New Access97ConnectionParameters() access97Params.FileName = "..\..\Data\nwind.mdb" Dim sqlDataSource As New DashboardSqlDataSource("SQL Data Source 1", access97Params) Dim selectQuery As SelectQuery = SelectQueryFluentBuilder.AddTable("SalesPerson"). _ SelectColumns("CategoryName", "Sales Person", "OrderDate", "Extended Price").Build("Query 1") sqlDataSource.Queries.Add(selectQuery) sqlDataSource.Fill() dashboardDesigner1.Dashboard.DataSources.Add(sqlDataSource)