Refresh dasboard on lost focus of tracker field

Any way to have a tracker refresh when someone tabs out of a Tracker field, so they don’t have to click the refresh button?

I have the following code in another dashboard, which refreshes on a button press (only slightly better than using the toolbar refresh)

private static void btnRefresh_Click(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		System.Reflection.MethodInfo methInfo = DBTVP_4a2c9af0_613c_487b_9856_d8abbaf29b35.GetType().GetMethod("RefreshDB", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
		if ((methInfo != null))
			{
			methInfo.Invoke(DBTVP_4a2c9af0_613c_487b_9856_d8abbaf29b35, null);
			}
	}

Which I figured I could just do within that LostFocus event of the tracker’s field.

But my dashboard (an Updateable one) doesn’t reference a “DBTVP_…” anywhere (yes I checked the All Code checkbox).

Ideas?

You might be able to trigger your refresh screen code on the system monitor events. A read-only tracker will not have any activity events other than retrieving and displaying the dataset.

Mazin

Some froggy use of reflection. If you have access to that dashboard assembly you reference, look up the c# type of that DBTVP. From there you can continue on.

If I had to guess, DBTVP = dashboard treeview panel.

I assume the dashboard is built with BAQDataViews, if so I’m sure you can force them to update. A quick glance shows that you may be able to do:

        BAQUpdater.UpdateBAQ(this);


//or even easier if your dashboard has it
// Ice.UI.App.PartOnHandStatus.MainController
public override void TransactionLoad()

I;ve never done it but I figured it’s a tree to bark up.

Wait a minute - is there a refresh button or toolbar item?

I think I figured out the problem. Since it’s a deployed Updatable dashboard, right clicking and selecting “Customization”,

image

isn’t the same as opening up the dashboard, enabling developer mode, and right-click select “Customize Tracker View”

Doing the later shows the reference I need.
image

But now I realize all the changes I made customizing the deployed Update-able Dashboard, must be re-done in the base dashboard. :frowning:

1 Like

A bitter sweet victory :persevere:

It’s even worse …

The Dashboard contains custom code, that uses the oTrans. Which can only be used in a deployed dashboard.

So updates to this dashboard require:

  1. Manually copying the code in the deployed Dashboard’s customization
  2. Modifying the base dashboard
  3. Deploying the modified dashboard
  4. Re-entering all the customizations from step 1.