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