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.0

This site makes extensive use of JavaScript.

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

Dashboard Template Interactions

Hide navigation
RSS
Modified on Wed, 12 Mar 2014 02:41 PM Categorized as Dashboard Templates, Script Library, Scripting
&dw; Script LibraryPrevious

Overview

Use a dashboard template to define a common theme or base from which to design new dashboards. The advantage of using a template is that you just need to create these common objects, styles, or Interaction Scripts on the template, and not on individual dashboards.

This article shows how to:
  • Call an Interaction script on the Template from the Dashboard.
  • Call an Interaction script on the Dashboard from the Template.

To actually create a new template and a new dashboard from the template, see Adding Dashboard Templates.

Call an Interaction script on the Template from the Dashboard

Steps

  1. On the template, add a Label control named Label1 on the upper left corner.
  2. On the template's Interaction List, add a new interaction named Set_Dashboard_Name.
    Add Template Interaction.

    Add Template Interaction.

  3. Add script below:

    Label1.Text = "Dashboard Name: " + e.Tag;
  4. On the dashboard that is using this template, for example a dashboard named Sales Dashboard, add script below on the Load Interaction:

    e = new DashboardMouseEventArgs();
    e.Tag = services.CurrentDashboard.Name;
    services.RunDashboardInteraction ("Set_Dashboard_Name", sender, e, services.CurrentDashboardTemplateParent);
    Label1.Text = "Dashboard Name: " + e.Tag;


Testing

View or Preview the Dashboard. The name of the dashboard will be displayed on the Label control on the template.
Preview of the Dashboard.

Preview of the Dashboard.


Call an Interaction script on the Dashboard from the Template

Steps

  1. On the template, add 2 Button controls named Button1 and Button2.
    Add 2 Button controls.

    Add 2 Button controls.

  2. On each of the Button controls' Click Interaction, add the script below:

    services.RunDashboardInteraction("Button_Clicked", sender, e, services.CurrentDashboardTemplateChild);
  3. On the dashboard's Interaction List, add a new interaction named Button_Clicked.
  4. Add script below:

    services.ShowMessage (sender.Name + " on template clicked");


Testing

View or Preview the Dashboard. Click on each of the Button controls. The name of the Button clicked is be displayed on a popup message box.
Button1 (object on the template) is clicked.

Button1 (object on the template) is clicked.

Button2 (object on the template) is clicked.

Button2 (object on the template) is clicked.


Related Topics

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

Copyright © 2009-2014 Dundas Data Visualization, Inc.