416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
This is the support page for the legacy Dundas Dashboard application. For assistance with the current Dundas BI application please click here.
Dashboard v5.5

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

Prevent data controls from loading data automatically

Hide navigation
RSS
Modified on Fri, 17 Oct 2014 11:56 AM Categorized as Data Controls, Design, Script Library
Dundas Dashboard Script LibraryPrevious


Overview

By default, when a dashboard is opened for viewing, the controls on the dashboard are automatically loaded with data according to their corresponding KPIs/datasets/parameters. However, there may be cases where you want to disable this behavior so that you can handle the loading of data manually yourself via scripting. For example, you may be designing a dashboard with controls that need to be populated differently based on some dynamic criteria, such as the current user who is logged in. In this case, having the dashboard controls load twice - once automatically and once again when you've determined the current user - is inefficient. Additionally, you may observe undesirable rendering effects when the data displayed by a control is immediately flipped between showing the initially loaded data and the subsequently loaded data.

Disabling loading of data

At the data control level

Data controls have an advanced property, Disable Loading Data [Script name: IsLoadingDataDisabled], which you can set via the properties grid or with a script. If this property is set to true, the control will not load data automatically when the dashboard is viewed:

// Don't load data automatically. BarChart1.IsLoadingDataDisabled = true;

To load data into the control manually (⪚ within the dashboard's Load interaction script), you can trigger its related parameter (if applicable):

// Invalidate the dashboard parameter filter. paramDate.InvalidateFilter();

To restore automatic loading of data, set the IsLoadingDataDisabled property back to false. The chart will automatically refresh its data afterwards.

// Restore loading of data back to normal. BarChart1.IsLoadingDataDisabled = false;

Note: The Refresh() method only works when IsLoadingDataDisabled is set to false. Otherwise, it has no effect.

Note: The Enable data refresh option takes precedence over the Disable Loading Data property.

At the dashboard level

The advanced property, Disable Loading Data, is also available at the dashboard level. Set this property to true for a dashboard in order to disable loading of data for all controls on the dashboard, regardless of the property setting at the control level.

To restore normal behavior of the dashboard, set the property back to false. This does not change or override the property setting on each control.

Script services

Use the following methods in the script services object to enable or disable loading of data for the current dashboard and each of its controls:

Disable data loading in the dashboard and each of its data visualization controls:

services.DisableDataLoading();

Enable data loading in the dashboard and each of its data visualization controls:

services.EnableDataLoading();

These are just convenience methods to help you reset the property values one way or the other.

For more details, see Using the Disable Loading Data property.

Analytical Dashboards

Analytical dashboards load data through the Report Manager control or the Analytical Combo control. To disable loading data initially on analytical dashboards, set the Freeze property to true in script on whichever of these two controls is used.

ReportManager1.Freeze = true;

The displayed data will not be updated until this property is set back to false.

ReportManager1.Freeze = false;

Viewers of the dashboard can also enable and disable freezing themselves if an Analytical Toolbar control with the Freeze command is added to the dashboard. See Designing Analytical Dashboards for details.

Related topics

About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2016 Dundas Data Visualization, Inc.