private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { var exportItem = e.Items.FirstOrDefault(i => i.ButtonType == DashboardButtonType.Export); if (exportItem != null) { e.Items.Remove(exportItem); } DashboardToolbarItem btnChangeLayout = new DashboardToolbarItem(); btnChangeLayout.Caption = "Change Layout"; btnChangeLayout.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(ChangeLayout); e.Items.Add(btnChangeLayout); DashboardToolbarItem btnRepositionItems = new DashboardToolbarItem(); btnRepositionItems.Caption = "Reposition Items"; btnRepositionItems.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(RepositionItems); e.Items.Add(btnRepositionItems); DashboardToolbarItem btnSaveLayout = new DashboardToolbarItem(); btnSaveLayout.Caption = "Save Layout to File"; btnSaveLayout.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(SaveLayoutToFile); e.Items.Add(btnSaveLayout); DashboardToolbarItem btnLoadLayout = new DashboardToolbarItem(); btnLoadLayout.Caption = "Load Layout from File"; btnLoadLayout.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(LoadLayoutFromFile); e.Items.Add(btnLoadLayout); }
void DashboardDesignerCustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem mergeItem = new DashboardToolbarItem("Open Dashboard to merge", MergeDashboard); mergeItem.SvgImage = (SvgImage)Properties.Resources.MergeIcon; mergeItem.Caption = "Merge Dashboard"; e.Items.Insert(0, mergeItem); }
private void DashboardViewer_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem myCommandButton = new DashboardToolbarItem(); myCommandButton.Caption = "Modify Chart"; myCommandButton.ClickAction = new Action <DashboardToolbarItemClickEventArgs>((args) => { ModifyChart(); }); e.Items.Add(myCommandButton); }
private void DashboardDesigner1_CustomizeDashboardTitle(object sender, DevExpress.DashboardWin.CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem itemSave = new DashboardToolbarItem((args) => UseCustomDBSchemaProvider()) { Caption = "Use Custom DBSchema Provider", }; e.Items.Clear(); e.Items.Add(itemSave); }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardViewer viewer = (DashboardViewer)sender; // Create the command button to set Master Filter. DashboardToolbarItem setMasterFilterItem = new DashboardToolbarItem("Set Master Filter", new Action <DashboardToolbarItemClickEventArgs>((args) => { SetMasterFilterMethod(); })); setMasterFilterItem.Caption = "Set Master Filter"; e.Items.Insert(0, setMasterFilterItem); }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem titleButton = new DashboardToolbarItem("Load Data", new Action <DashboardToolbarItemClickEventArgs>((args) => { LoadNewData(); })); titleButton.Caption = "Load Data"; e.Items.Add(titleButton); }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem resetStateItem = new DashboardToolbarItem("Reset State", new Action <DashboardToolbarItemClickEventArgs>((args) => { dashboardViewer1.SetDashboardState(CreateDashboardState());; })); resetStateItem.Caption = "Reset Dashboard State"; e.Items.Add(resetStateItem); }
private void DashboardViewer1_CustomizeDashboardItemCaption(object sender, CustomizeDashboardItemCaptionEventArgs e) { DashboardViewer viewer = (DashboardViewer)sender; if (e.DashboardItemName == "pieDashboardItem1") { DashboardToolbarItem infoButton = new DashboardToolbarItem(); MultiDimensionalData mData = viewer.GetItemData(e.DashboardItemName); var orderCount = mData.GetValue(mData.GetMeasures().Where(m => m.DataMember == "OrderID").First()).Value ?? 0; e.FilterText += string.Format("{0:N0} distinct orders are displayed", orderCount); } }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, DevExpress.DashboardWin.CustomizeDashboardTitleEventArgs e) { DashboardViewer dashboardViewer = (DashboardViewer)sender; DashboardToolbarItem commandButton = new DashboardToolbarItem(dashboardViewer.UseNeutralFilterMode, "NEUTRAL FILTER MODE", new Action <DashboardToolbarItemClickEventArgs>((args) => { dashboardViewer.UseNeutralFilterMode = !dashboardViewer.UseNeutralFilterMode; dashboardViewer1.DashboardSource = typeof(Dashboard1); })); commandButton.Caption = "NEUTRAL FILTER MODE"; e.Items.Add(commandButton); }
/// <summary> /// Used to add the Clear Filter button to the PivotGrid Item's caption /// </summary> void OnCustomizeDashboardItemCaption(object sender, CustomizeDashboardItemCaptionEventArgs e) { if (e.DashboardItemName == "pivotDashboardItem1") { DashboardToolbarItem showDataItem = new DashboardToolbarItem("Clear Master Filter", new Action <DashboardToolbarItemClickEventArgs>((args) => { dashboardDesigner1.BeginUpdateParameters(); ClearPivotFilter(); dashboardDesigner1.EndUpdateParameters(); })); showDataItem.Enabled = IsAnyFilterSet(); showDataItem.SvgImage = svgImageCollection1[0]; e.Items.Insert(0, showDataItem); } }
void DashboardViewerCustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem nextTabItem = new DashboardToolbarItem("Next tab", NextPrevTabItemClick); nextTabItem.Tag = NextPrevValue.Next; nextTabItem.SvgImage = imageCollection["Next"]; e.Items.Insert(0, nextTabItem); DashboardToolbarItem prevTabItem = new DashboardToolbarItem("Previous tab", NextPrevTabItemClick); prevTabItem.Tag = NextPrevValue.Prev; prevTabItem.SvgImage = imageCollection["Prev"]; e.Items.Insert(0, prevTabItem); DashboardToolbarItem showTabHederItem = new DashboardToolbarItem(TabContainer.ShowCaption, "Show tab headers", ShowHideTabHeadersItemClick); showTabHederItem.SvgImage = imageCollection["ShowCaption"]; e.Items.Insert(0, showTabHederItem); DashboardToolbarItem slideShowItem = new DashboardToolbarItem(slideShowTimer.Enabled, "Slideshow", SlideShowItemClick); slideShowItem.SvgImage = imageCollection["Slideshow"]; e.Items.Insert(0, slideShowItem); }