The requested page is not available for the requested platform. You are viewing the content for Default platform.

How to: Obtain a Dashboard Item's Underlying Data for a Clicked Visual Element


This documentation applies to v16.2. Starting with v17.1, the ASPxDashboardViewer control is in maintenance mode. In v19.1, the new Web Dashboard Control replaces the old Web Dashboard Viewer. This means that the Web Dashboard Viewer will not be included in our installation packages. See our blog post for more information.

Refer to the following KB articles to learn how to migrate to ASPxDashboard / ASP.NET MVC Dashboard:

The following example demonstrates how to obtain underlying data corresponding to a particular visual element using the ASPxClientDashboardViewer's API.

In this example, the ASPxClientDashboardViewer.ItemClick event is handled to obtain underlying data and invoke the dxPopup widget with the child dxDataGrid.

In the event handler, the ASPxClientDashboardItemClickEventArgs.RequestUnderlyingData method is called to obtain records from the dashboard's data source. The dxDataGrid is used to display these records.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" 
         Inherits="Dashboard_UnderlyingDataWeb.WebForm1" %>

<%@ Register Assembly="DevExpress.Dashboard.v14.2.Web, Version=, 
             Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
    <div id="myPopup"></div>
    <script type="text/javascript" src="<%= Page.ResolveClientUrl("~/Scripts/UnderlyingData.js") %>">
        <dx:ASPxDashboardViewer ID="ASPxDashboardViewer1" runat="server" 
            DashboardSource="<%# typeof(Dashboard_UnderlyingDataWeb.SalesDashboard) %>">            
                   ItemClick="function(s, e) { getUnderlyingData(e); }"
                   Init="function(s, e) { initPopup(); }" />
See Also