All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DashboardViewer.GetAvailableFilterValuesAsync(String) Method

Gets the data (axis point tuples) that identifies selectable elements in the current state of the master filter item.

Namespace: DevExpress.DashboardWin

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

Declaration

public Task<IList<AxisPointTuple>> GetAvailableFilterValuesAsync(
    string dashboardItemName
)
Public Function GetAvailableFilterValuesAsync(
    dashboardItemName As String
) As Task(Of IList(Of AxisPointTuple))

Parameters

Name Type Description
dashboardItemName String

A String that is the component name of the master filter item.

Returns

Type Description
Task<IList<AxisPointTuple>>

The task object that is the asynchronous operation to get a list of AxisPointTuple objects.

Examples

This example demonstrates how to work in asynchronous mode to get filter values, set the master filter and perform an asynchronous task when the dashboard is loaded for the first time.

Note

The complete sample project How to Get FIlter Values and Set Master Filter Asynchronously is available in the DevExpress Examples repository.

using DevExpress.DashboardCommon.ViewerData;
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RandomFilterExample
{
    public partial class ViewerForm1 : XtraForm {
        public ViewerForm1() {
            InitializeComponent();
            dashboardViewer1.Initialized += OnDashboardViewerInitialized;

        }
        async void OnMouseClick(object sender, MouseEventArgs e) {
            await RandomFilter();
        }
        async Task RandomFilter() {
            string itemName = "choroplethMapDashboardItem1";
            IList<AxisPointTuple> filters = await dashboardViewer1.GetAvailableFilterValuesAsync(itemName);
            Random r = new Random();
            int index = r.Next(0, filters.Count - 1);
            await dashboardViewer1.SetMasterFilterAsync(itemName, filters[index]);
        }

        async void OnDashboardViewerInitialized(object sender, EventArgs e) {
            await RandomFilter();
        }
    }
}
See Also