Back to Devexpress

DashboardViewer.MasterFilterSet Event

dashboard-devexpress-dot-dashboardwin-dot-dashboardviewer-e70435e6.md

latest7.7 KB
Original Source

DashboardViewer.MasterFilterSet Event

Occurs when an end user changes the state of the master filter.

Namespace : DevExpress.DashboardWin

Assembly : DevExpress.Dashboard.v25.2.Win.dll

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
public event MasterFilterSetEventHandler MasterFilterSet
vb
Public Event MasterFilterSet As MasterFilterSetEventHandler

Event Data

The MasterFilterSet event's data class is MasterFilterSetEventArgs. The following properties provide information specific to this event:

PropertyDescription
DashboardItemNameGets the name of the dashboard item.
SelectedRangeGets the selected range in the Range Filter dashboard item.
SelectedValuesGets currently selected records in the master filter item.

The event data class exposes the following methods:

MethodDescription
IsNullValue(Object)Returns whether the specified value is DashboardSpecialValues.NullValue.
IsOthersValue(Object)Returns whether the specified value is DashboardSpecialValues.OthersValue.

Remarks

The MasterFilterSet event occurs when an end-user changes the state of the master filter.

The MasterFilterSetEventArgs class exposes the MasterFilterSetEventArgs.DashboardItemName property that allows you to determine the name of the master filter item which causes the event.

Use the MasterFilterSetEventArgs.SelectedValues property to obtain values of selected elements in the master filter item. To determine the selected range in the Range Filter dashboard item, use the MasterFilterSetEventArgs.SelectedRange property.

Note

The MasterFilterSetEventArgs.SelectedValues property returns the DashboardSpecialValues.NullValue or DashboardSpecialValues.OthersValue values instead of null or “Others” values, respectively.

Tip

To reduce the application load time and decrease memory consumption, handle the MasterFilterDefaultValues event that occurs before the data is loaded.

The following code snippets (auto-collected from DevExpress Examples) contain references to the MasterFilterSet event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-apply-master-filter-in-viewer/CS/Dashboard_SetMasterFilter/Form1.cs#L20

csharp
dashboardViewer1.MasterFilterSet += DashboardViewer1_MasterFilterSet;
dashboardViewer1.MasterFilterCleared += DashboardViewer1_MasterFilterCleared;

winforms-dashboard-customize-title-and-item-captions/CS/CustomizeDashboardItemCaptionExample/ViewerForm1.cs#L20

csharp
dashboardViewer.PopupMenuShowing += DashboardViewer_PopupMenuShowing;
dashboardViewer.MasterFilterSet += DashboardViewer_MasterFilterSet;

how-to-display-pie-chart-others-slice/CS/PieChartOtherSliceExample/Form1.cs#L16

csharp
dashboardViewer1.ConfigureDataConnection += dashboardViewer1_ConfigureDataConnection;
dashboardViewer1.MasterFilterSet += dashboardViewer1_MasterFilterSet;
dashboardViewer1.MasterFilterCleared += DashboardViewer1_MasterFilterCleared;

winforms-dashboard-apply-master-filter-in-viewer/VB/Dashboard_SetMasterFilter/Form1.vb#L21

vb
dashboardViewer1.LoadDashboard("Dashboard.xml")
AddHandler dashboardViewer1.MasterFilterSet, AddressOf DashboardViewer1_MasterFilterSet
AddHandler dashboardViewer1.MasterFilterCleared, AddressOf DashboardViewer1_MasterFilterCleared

winforms-dashboard-customize-title-and-item-captions/VB/CustomizeDashboardItemCaptionExample/ViewerForm1.vb#L23

vb
AddHandler dashboardViewer.PopupMenuShowing, AddressOf DashboardViewer_PopupMenuShowing
AddHandler dashboardViewer.MasterFilterSet, AddressOf DashboardViewer_MasterFilterSet

how-to-display-pie-chart-others-slice/VB/PieChartOtherSliceExample/Form1.vb#L15

vb
AddHandler dashboardViewer1.ConfigureDataConnection, AddressOf dashboardViewer1_ConfigureDataConnection
AddHandler dashboardViewer1.MasterFilterSet, AddressOf dashboardViewer1_MasterFilterSet
AddHandler dashboardViewer1.MasterFilterCleared, AddressOf DashboardViewer1_MasterFilterCleared

Implements

MasterFilterSet

See Also

MasterFilterCleared

Synchronize Master Filter and Drill Down Actions Between Dashboards

DashboardViewer Class

DashboardViewer Members

DevExpress.DashboardWin Namespace