BAQCombo to "refresh" Dashboard

Hi all,

I’ve been struggling with this dashboard.

Updateable Dashboard to modify Employee labor rate. UPDBaq working, UPDDashboard working.
Issue?
Dashboard tracker view customized to show a BAQCombo dropdown field. After selecting the desiered employee, the intention is to trigger the “refresh” action in dashboard, so far I need to manually click the refresh tool at the top and it works.

I have created some events with the event wizard. but nothing seems to be working… i mean… I can’t even test because of some script errors.

This is my Dashboard (very simple one)

here is the code inside of my Customized Tracker View:

// **************************************************
// Custom code for 96855c5d-b778-48fd-a7b4-4d0f2b252e55
// Created: 10/26/2023 8:17:25 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
using System.Reflection;

public static class Script
{
	// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
	// Begin Wizard Added Module Level Variables **

	// End Wizard Added Module Level Variables **

	// Add Custom Module Level Variables Here **

	public static void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls

		Script.SelEmp.ValueChanged += new System.EventHandler(Script.SelEmp_ValueChanged);
		Script.f5.CheckedValueChanged += new System.EventHandler(Script.f5_CheckedValueChanged);
		// End Wizard Added Custom Method Calls
	}

	public static void DestroyCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		Script.SelEmp.ValueChanged -= new System.EventHandler(Script.SelEmp_ValueChanged);
		Script.f5.CheckedValueChanged -= new System.EventHandler(Script.f5_CheckedValueChanged);
		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
	}

	private static void SelEmp_ValueChanged(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		f5.Checked = true;
	}

	private static void f5_CheckedValueChanged(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		MainController.AppControlPanel.HandleToolClick("RefreshTool", new 
			Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools["RefreshTool"], null));
	}
}

and this are the erros I’m getting:

any help or suggestion will be very appreciated…

Don’t do that kind of customization right in the dashboard. As you can see, it doesn’t have all of the stuff (like the rest of the dashboard. You only have access to what’s in the specific panel). The only customization you should do in there is adding tracker items, or rearranging stuff. Any actual functionality that you want to do (like refresh the dashboard) should be done on a proper customization layer.

I pretty much avoid customizing the tracker panel like that because once you do, you can’t automatically add new fields. So I do all of my arranging on a proper customization. And there are tricks on the BAQ side to get drop downs to work the way you want without customization.

So deploy the dashboard, add it to a menu, and create a customization on that, and things will work a lot better.

3 Likes

Thank you!!! will give it a try and let you know!!!

2 Likes