Sometimes your application will integrate a custom UI, to present the user with a list of values to select. And you might want that user selection to be synchronized with a filter in the dashboard.
For example, you can have a Sales dashboard that changes figures based on the current Territory and a custom UI to select the Territory. After the user selection changes, you’d want the Sales dashboard to reflect that change. Most of the times, you would hide the filter selection normally displayed in the dashboard. This way the user won’t be confused with two different ways to change the Territory in the screen.
In the following code snippet, you’ll find details about how to achieve the described scenario:
private void Americas_Click(object sender, RoutedEventArgs e)
{
revealView.SetFilterSelectedValues(
revealView.Dashboard.GetFilterByTitle("Territory"),
new List<object>() { "Americas" });
}
private void APAC_Click(object sender, RoutedEventArgs e)
{
revealView.SetFilterSelectedValues(
revealView.Dashboard.GetFilterByTitle("Territory"),
new List<object>() { "APAC" });
}
As shown above, two buttons were added to change the Territory selected between Americas and APAC. The code includes only the click handlers.
You can do the same when the selection is changed on your selector, just setting the new territory name using SetFilterSelectedValues.