How do you target a panel in a multi-panel dashboard for a Refresh button


I created a 3 panel dashboard. Two of the panels have information and are tied together by published fields in the parent and filters in the child panel. The third panel is an empty Tracker View panel I am using to hold a refresh button I added in customization after I deployed the dashboard to the menu.

My problem is: If I click on the child panel (it gives the details for the parent panel summaries) and then click either my refresh button or the built in one at the top, it just refreshes the child panel (and pulls in all the data instead of the filtered data).

I need it to refresh the parent panel, regardless of where I clicked in last.

If this doesn’t make sense, please let me know and I can try to clarify further.

Any help is appreciated.

Hey Shawn,

You could create a customization on the dashboard, then add a ToolClick function that focuses your grid/panel whenever the refresh button is clicked (or any other tool, unless you added a check). Then that will be the grid that’s selected for the refresh.

That is what I was thinking too but I am unsure on how to do that.
Do you know what the code should be?

Here’s what I did after getting into customization mode:

Added ToolClick function with form event wizard (BeforeToolClick didn’t work surprisingly)

Added the code to focus grid to the newly generated function

EpiUltraGrid focusGrid = (EpiUltraGrid)csm.GetNativeControlReference("df414142-0f1b-46e3-8204-ba97fe7baa3a"); 

You’ll need to change the EpiGUID to match your grid’s. You can find it in the grid’s properties.

And that should be it!


I followed what you said and it doesn’t seem to do what I need.

A part that I left out because I didn’t think it would be needed, was that the BAQ for the parent pops up asking for a start date and end date when refreshed.

When I click in the child panel and hit the Refresh button (either the one I made or the built-in one), it flashes like a refresh but doesn’t trigger the pop up.

When I am in the parent panel and hit either refresh, it pops up fine.

I was hoping that focusing the parent panel’s grid first would trigger the pop up.

Any ideas on that?

Hmmm I’m not sure. The dashboard I was testing on behaves the same way, with parameters (dates) that pop up for the main grid on refresh. And you updated the GUID from df414142-0f1b-46e3-8204-ba97fe7baa3a to whatever your grid’s is? Did you completely restart the dashboard with the customization applied? It could be something to do with our versions. If all else fails you could try doing a BeforeToolClick function instead of ToolClick, but that didn’t work for me.

Yes, I did change the GUID before testing. I just tried the before tool click.
I tried adding the code to the refresh method itself, none of it seemed to work.

How do I know the focus was changed by the code? Is there a way to test it changed?

Gotcha. It can be kind of hard to tell if the focus is working, but if you select a row in one of the other grids you should be able to see a unique border showing that it’s selected/focused. Then, when you click the refresh tool button, if that border goes away you know the focus changed. I don’t think this would ever work with your custom refresh button (in it’s current form) though since I don’t think it’s viewed as a “Tool”.


I have verified that it does set the focus to the parent panel’s grid when you refresh but it must need to have something on the grid selected for the refresh to trigger it.

What code would do a selection on the grid.

Hypothetically, it could select the first row on the grid, then refresh. Maybe that will trigger.


I got it working for me.

I combined your code with one extra commmand that I found online.

Below is the refresh method I use.

private void Refresh_Click(object sender, System.EventArgs args){
EpiUltraGrid focusGrid = (EpiUltraGrid)csm.GetNativeControlReference(“6078c2bb-5bfa-45f2-9ebc-2b5a790e79b9”);
focusGrid.Rows[0].Selected = true;

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

The bold line is the line I added that got it to actually select a line in the parent panel grid.

@Asz0ka - I really appreciate you sticking this out with me. I couldn’t have got here without you!

You are AWESOME!!!


Good deal! Glad you got it working.

This does not work if the grid does not have at least one record to select. How did you manage that?

1 Like

The way I’ve done it in the past is set the focus to a text box in the panel and then do the refresh. If there isn’t one on the panel, you could always just add one and make it hidden.

1 Like

Thanks. I had to do the same. To me this solution is a hack. Epicor has to give us a cleaner way to do a simple refresh