Giter Site home page Giter Site logo

devexpress-examples / web-forms-dashboard-update-parameter-master-filter-changed Goto Github PK

View Code? Open in Web Editor NEW
0.0 56.0 1.0 982 KB

How to pass filter values to a parameter in the ASP.NET Web Forms Dashboard

License: Other

C# 37.19% ASP.NET 20.81% Visual Basic .NET 36.53% JavaScript 5.48%
dotnet web-forms-dashboard business-intelligence analytics dashboard-for-web-forms

web-forms-dashboard-update-parameter-master-filter-changed's Introduction

Dashboard for Web Forms - How to update the dashboard parameter value when the item's master filter state is changed

This example illustrates how to pass master filter values to a hidden dashboard parameter.

Web Dashboard

The Orders grid item is bound to the Orders data source, and the Details pie item is bound to the CustOrdersDetail data source. The grid's master filter values are passed to the OrderID dashboard parameter that is used to filter the CustOrdersDetail data source (the OrderIDParameter query parameter is mapped to the OrderID dashboard parameter):

Data Source Filter

The ViewerApiExtensionOptions.onItemMasterFilterStateChanged event handler obtains changed master filter values. The DashboardParameterDialogExtension.getParameters method obtains the dashboard parameters. The DashboardParameter.setValue method passes master filter's values to the OrderID dashboard parameter:

var dashboardControl;

function onBeforeRender(s, e) {
	dashboardControl = s.GetDashboardControl();
	var viewerApiExtension = dashboardControl.findExtension('viewerApi');
	if (viewerApiExtension)
		viewerApiExtension.on('itemMasterFilterStateChanged', onItemMasterFilterStateChanged);
}
function onItemMasterFilterStateChanged(e) {
	if (e.itemName == "gridDashboardItem1") {
		var dashboardParameterDialogExtension = dashboardControl.findExtension('dashboardParameterDialog');
		var parameters = dashboardParameterDialogExtension.getParameters();
		var parameter1 = parameters.getParameterByName("OrderID");
		parameter1.setValue(e.values[0][0]);
	}
}

The default master filter and dashboard parameter values are specified in the dashboard state.

Files to Review

Documentation

More Examples

web-forms-dashboard-update-parameter-master-filter-changed's People

Contributors

alexanderkovalenko avatar devexpressexamplebot avatar natakazakova avatar pollyndos avatar sergeynakhankov avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bechirzf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.