Refresh Embedded Dashboard on Form Event

I have a UD_Table Maintenance customization with an embedded dashboard in it. The Form serves as an Entry form with the Dashboard pulling the data back in via BAQ.

When I Save the new data I’d like for the dashboard to automatically Refresh so you can see that it’s been added correctly. It’s a little awkward when clicking Save to add the new data and nothing happens. I’ve seen a few questions like this but haven’t found the answer I’m looking for yet.

The toolbar for the dashboard don’t seem to work like the tools on the form itself so ‘MessageBox.Show(args.Tool.Key);’ doesn’t return anything for me. So I’m not sure how to say “Hey I see you’ve clicked the Save tool on the form, go click that Refresh Tool on the dashboard”.

if you have an event working already on the save event - you could try oTrans.Refresh();

Isn’t that what the epiview Notification event is for?

oTrans.Refresh() doesn’t work. I believe that’s because that’s only refreshing the dataview of the form, which the dashboard is not a part of. The dashboard is on another plane of existence it seems.

IDK what you mean Brandon, I’m not having trouble looking for the event to do something, I’m having trouble looking for the thing that call’s the Dashboard Refresh tool when said event happens.

For example, if I do

AfterClickfunction(args and stuff)
{
if(args.Tool.Key == “SaveTool”)
{
oTrans.Refresh();
}
}

that refreshes the UD dataview when I click the Save Button on the form. What I need it to do is Refresh the dashboard, and I don’t know how to get the tool name for the dashboard’s refresh. Targeting the dashboard’s own toolbar is what I’m unsure how to do.

Question for you Brendan, did you end up getting a solution?

Toby,

Sorry no I didn’t find a solution to this particular issue. The project itself wasn’t a huge priority so just having the users Refresh the dashboard after adding a new record wasn’t the worst thing in the world. Somebody much cleverer than myself might be able to do it but I decided it was more “Nice to have” than absolutely necessary.

Not sure if this is a solution, because I couldn’t refresh the embedded dashboard, so I remove it off the panel by disposing it. Then recreating a new instance and add the control back in. But the screen flashes and does refresh fully. Anyone else has a better solution, please let me know.

private void epiButtonSave_Click(object sender, System.EventArgs args)
{
	// ** Place Event Handling Code Here **
	oTrans.Update();

	System.Collections.Hashtable customControls = this.csm.PersonalizeCustomizeManager.CustControlMan.CustomControlsHT;
	System.Collections.Hashtable controlsHT =  this.csm.PersonalizeCustomizeManager.ControlsHT;

	customControls.Remove("LinKReallocateJobsed149e4d-9788-495f-a19a-c1c45e8d044e");
	controlsHT.Remove("LinKReallocateJobsed149e4d-9788-495f-a19a-c1c45e8d044e");
	this.ReallocateJobsDashboardPanel.Dispose();
	this.ReallocateJobsDashboardPanel = null;

	Ice.Lib.Framework.LaunchFormOptions lfo_ReallocateJobsDashboardPanel;
	lfo_ReallocateJobsDashboardPanel = Ice.Lib.Customization.Designers.DashboardPanelDesigner.GetDashboardPanelLaunchOptions("LinKReallocateJobs");
	lfo_ReallocateJobsDashboardPanel.DashboardPanelOptions.HideStatus = true;
	lfo_ReallocateJobsDashboardPanel.DashboardPanelOptions.HideToolbar = true;
	((Ice.Lib.Framework.LaunchDashboardOptions)(lfo_ReallocateJobsDashboardPanel.ValueIn)).ManualRefresh = false;
	this.ReallocateJobsDashboardPanel = ((Ice.UI.Dashboard.DashboardPanel)(Ice.Lib.Framework.LaunchDashboardOptions.GetDashboardPanel(lfo_ReallocateJobsDashboardPanel)));
	this.ReallocateJobsDashboardPanel.Name = "ReallocateJobsDashboardPanel";
	this.ReallocateJobsDashboardPanel.EpiGuid = "LinKReallocateJobsed149e4d-9788-495f-a19a-c1c45e8d044e";
	customControls.Add("LinKReallocateJobsed149e4d-9788-495f-a19a-c1c45e8d044e", this.ReallocateJobsDashboardPanel);
	controlsHT.Add("LinKReallocateJobsed149e4d-9788-495f-a19a-c1c45e8d044e", this.ReallocateJobsDashboardPanel);

	// ReallocateJobs
	this.ReallocateJobs.Controls.Add(this.ReallocateJobsDashboardPanel);
	this.ReallocateJobsDashboardPanel.Dock = System.Windows.Forms.DockStyle.Fill;

}

Triggering the dashboards refresh tool event handler works:
MainController.AppControlPanel.HandleToolClick(“RefreshTool”, new

Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools[“RefreshTool”], null));

In which event? Is it in Main Screen Customization or in Dashboard Customization?

The Main screen customization. Something like an after-adapter method or a row changed on the main view.

Is it possible to refresh the embedded Updatable dashboard from Main Screen?