Dashboard On User Refresh Event Handler

I’m looking for customization code for an event handler to detect when a user clicks the native refresh button in the upper left-hand corner of a dashboard. Something along the lines of

Private Void OnUserRefresh(){
      //do something after BAQ is refreshed

But I don’t know how to tie the refresh button to trigger that OnUserRefresh function. So far I’ve only found code for triggering a refresh, not catching the refresh action from the native refresh button.

The reason I need this is because I have a customization that does active filtering. If a user inputs something into one of the filters and then presses refresh, all (unfiltered) rows are returned. I’m trying to find a way to run my filtering function after the user presses refresh.

Any help would be greatly appreciated!

I think you will be looking for “Before Toolclick/After Toolclick”

1 Like

Thank you! I’ve been scouring the forms for hours trying to figure this out. That nomenclature makes no sense to me but the “After Toolclick” is exactly what I was looking for and works great.

The toolname is “RefreshTool” if you need that.

That method makes more sense now that you say that. We’re detecting a tool click with that method, then we need to figure out what tool click occurred.

The below code is working great in case anyone else is looking for info on this same question.

private void MainController_AfterToolClick(object sender, Ice.Lib.Framework.AfterToolClickEventArgs args)
		switch (args.Tool.Key)
			case "RefreshTool":
				filterme(); //this is the name of my filtering function that takes all the user input. 

1 Like