How to: Apply Master Filtering in the ASP.NET Web Forms Dashboard Control in OLAP Mode

  • 2 minutes to read

The following example demonstrates how to apply master filtering in ASPxDashboard on the client side when the dashboard is connected to an OLAP cube.

In this example, the ASPxClientDashboard.SetMasterFilter method is used to select required cards in the Card dashboard item. This method is called in the onClick event handler of the dxButton.

View Example

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" 
    Inherits="ASPxDashboard_SetMasterFilter_Olap.Default" %>

<%@ Register Assembly="DevExpress.Dashboard.v16.2.Web, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
    Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">

    <div id="setMasterFilterButton" style="float: left; margin-left: 150px;"></div>
    <div id="clearMasterFilterButton" style="float: left; margin-left: 150px;"></div>

    <div style="position: absolute; left: 0; right: 0; top:50px; bottom:0;">
        <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" 
            ClientSideEvents-Init="function() { initializeFilters(); }" 
            Width="100%" Height="100%"></dx:ASPxDashboard>
<script type="text/javascript" src="<%= Page.ResolveClientUrl("~/Scripts/MasterFiltering.js") %>"></script>