DashboardDesigner.DataItemPopupMenuShowing Event
Allows you to customize a data item popup menu invoked in the UI.
Namespace: DevExpress.DashboardWin
Assembly: DevExpress.Dashboard.v24.2.Win.dll
Declaration
Event Data
The DataItemPopupMenuShowing event's data class is DataItemPopupMenuShowingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Allow | Gets or sets whether users can invoke a data item’s pop-up menu. |
DashboardItemName | Gets the component name of the dashboard item for which the event is raised. |
DataItem | Gets a data item for which a pop-up menu is invoked. |
Menu | Gets a data item’s pop-up menu. |
Remarks
The following code snippet shows how to hide the Day
group interval option in pop-up menus of data items in the Arguments
section:
using System.Linq;
using System.Windows.Forms;
using DevExpress.DashboardCommon;
using DevExpress.XtraBars;
// ...
private void dashboardDesigner1_DataItemPopupMenuShowing(object sender, DevExpress.DashboardWin.DataItemPopupMenuShowingEventArgs e){
CustomDashboardItem<FunnelItemMetadata> dashboardItem = dashboardDesigner1.Dashboard.Items[e.DashboardItemName] as CustomDashboardItem<FunnelItemMetadata>;
if(dashboardItem != null){
Dimension dimension = e.DataItem as Dimension;
if (dashboardItem.Metadata.Arguments.Contains(dimension)){
foreach (BarItemLink link in e.Menu.ItemLinks.Where(x => x.Data is DateTimeGroupInterval))
link.Visible = ((DateTimeGroupInterval)link.Data) != DateTimeGroupInterval.Day;
}
}
}
See Also