DashboardControl.DashboardItemMouseUp Event

Occurs when the mouse pointer is over the dashboard item and a mouse button is released.

Namespace: DevExpress.DashboardWpf

Assembly: DevExpress.Dashboard.v18.2.Wpf.dll

Declaration

public event DashboardItemMouseActionWpfEventHandler DashboardItemMouseUp
Public Event DashboardItemMouseUp As DashboardItemMouseActionWpfEventHandler

The DashboardItemMouseUp event handler receives an argument of the DashboardItemMouseActionWpfEventArgs type. The following properties provide information specific to this event.

Property Description
DashboardItemName Gets the name of the dashboard item.
Data Gets the data displayed in the dashboard item.

Use the e.DashboardItemName property to obtain the dashboard item name for which the event is raised.

To obtain the data related to the dashboard item element, use the following methods:

An event retrieves data from different dashboard item's visual elements:

An event has the following limitations:

Note

The complete sample project How to handle a mouse click to obtain dashboard item data is available in the DevExpress Examples repository.

private void DashboardControl_DashboardItemMouseUp(object sender, DevExpress.DashboardWpf.DashboardItemMouseActionWpfEventArgs e)
{
    if (e.DashboardItemName == "cardDashboardItem1" & e.GetAxisPoint() != null)
    {
        // Obtains client data related to the clicked card.
        MultiDimensionalData clickedItemData = e.GetSlice();
        DeltaDescriptor delta = e.GetDeltas()[0];

        // Creates a data table that will be used to hold client data.
        DataTable dataSource = new DataTable();
        dataSource.Columns.Add("Argument", typeof(DateTime));
        dataSource.Columns.Add("Actual", typeof(double));
        dataSource.Columns.Add("Target", typeof(double));

        // Saves values of axis points placed on the "sparkline" axis and corresponding
        // actual/target values to the data table.
        foreach (AxisPoint point in
            clickedItemData.GetAxisPoints(DashboardDataAxisNames.SparklineAxis))
        {
            DataRow row = dataSource.NewRow();
            DeltaValue deltaValue = clickedItemData.GetSlice(point).GetDeltaValue(delta);
            if (deltaValue.ActualValue.Value != null &&
                deltaValue.TargetValue.Value != null)
            {
                row["Argument"] = point.Value;
                row["Actual"] = deltaValue.ActualValue.Value;
                row["Target"] = deltaValue.TargetValue.Value;
            }
            else
            {
                row["Argument"] = DBNull.Value;
                row["Actual"] = DBNull.Value;
                row["Target"] = DBNull.Value;
            }
            dataSource.Rows.Add(row);
        }
        DisplayDetailedChart(GetFormTitle(clickedItemData), dataSource);
    }
}
See Also