ASPxClientDashboardItemSelectionChangedEventArgs Class

Namespace: DevExpress.DashboardWeb.Scripts

Assembly: DevExpress.Dashboard.v18.1.Web.WebForms.Scripts.dll

Syntax

public class ASPxClientDashboardItemSelectionChangedEventArgs : ASPxClientEventArgs

The ASPxClientDashboard.ItemSelectionChanged / ASPxClientDashboardViewer.ItemSelectionChanged events are raised after the selection within the dashboard item is changed. The selection can be changed in the following ways:

The ASPxClientDashboardItemSelectionChangedEventArgs.ItemName property returns the name of dashboard item for which the event was raised. Use the GetCurrentSelection method to obtain currently selected elements.

Examples

The Web Dashboard allows you to add a custom interactivity to dashboards using the ASPxClientDashboard.ItemVisualInteractivity event. This example demonstrates the following capabilities.

  • The Grid dashboard item allows you to select categories and visualize a corresponding product quantity using the dxBarGauge widget. Note that the hidden 'Quantity' measure is used to pass the required values to the client.
  • The Chart dashboard item highlights bars corresponding to a hovered argument value.
Imports DevExpress.DashboardWeb
Imports System

Namespace ASPxDashboard_CustomVisualInteractivity
    Partial Public Class WebForm1
        Inherits System.Web.UI.Page

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
            ASPxDashboard1.SetDashboardStorage(New DashboardFileStorage(Server.MapPath("App_Data/Dashboards")))
        End Sub
    End Class
End Namespace
<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="WebForm1.aspx.vb" 
    Inherits="ASPxDashboard_CustomVisualInteractivity.WebForm1" %>

<%@ Register Assembly="DevExpress.Dashboard.v17.1.Web, Version=17.1.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
    Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server">
    <div style="display: inline-block; float: left;">
        <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" Height="600px" Width="800px"
            WorkingMode="Viewer"          
            ClientInstanceName="webViewer" 
            ClientSideEvents-DashboardEndUpdate="function() { createControls(); }"
            ClientSideEvents-ItemSelectionChanged="function(s, e) { applyCurrentSelection(e); }" 
            ClientSideEvents-ItemVisualInteractivity = "function(s, e) { addCustomInteractivity(e); }">
        </dx:ASPxDashboard>
    </div>
    <div id="barGauge" style="display: inline-block; float: left; width: 600px; height: 600px;"></div>
    </form>
</body>
</html>
<script type="text/javascript" src="<%=Page.ResolveClientUrl("~/Scripts/CustomInteractivity.js")%>"></script>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" 
    Inherits="ASPxDashboard_CustomVisualInteractivity.WebForm1" %>

<%@ Register Assembly="DevExpress.Dashboard.v17.1.Web, Version=17.1.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
    Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server">
    <div style="display: inline-block; float: left;">
        <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" Height="600px" Width="800px"
            WorkingMode="Viewer"          
            ClientInstanceName="webViewer" 
            ClientSideEvents-DashboardEndUpdate="function() { createControls(); }"
            ClientSideEvents-ItemSelectionChanged="function(s, e) { applyCurrentSelection(e); }" 
            ClientSideEvents-ItemVisualInteractivity = "function(s, e) { addCustomInteractivity(e); }">
        </dx:ASPxDashboard>
    </div>
    <div id="barGauge" style="display: inline-block; float: left; width: 600px; height: 600px;"></div>
    </form>
</body>
</html>
<script type="text/javascript" src="<%= Page.ResolveClientUrl("~/Scripts/CustomInteractivity.js") %>"></script>
using DevExpress.DashboardWeb;
using System;

namespace ASPxDashboard_CustomVisualInteractivity
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ASPxDashboard1.SetDashboardStorage(new DashboardFileStorage(Server.MapPath("App_Data/Dashboards")));
        }
    }
}

Inheritance

Object
ASPxClientDashboardItemSelectionChangedEventArgs

See Also