Invoke data source from 2 sources?

I'm a newbie and am testing things.

Above a datagrid I have a Button for "On Click - Invoke Data Source Method" which gets the records, uses a filter, etc.

Above the same datagrid, I display Radio Buttons to allow users to select a specific type of record in the grid - to do pre-filter before data in the grid displays.
(example - I have a grid that shows All Invoices. To help the user, I want radio buttons:
()Closed. ()New. ()PastDue. for example )

If I want to have the datagrid "auto" refresh when the Radio Button is changed, DO I HAVE TO re-code the entire "On Click - Invoke Data Source Method" that I already have on the Button... or can I somehow trigger that code - or simulate a push/click on the Button.

Maybe it will be better if you use LoadData event of the DataGrid to invoke the data source method and later just execute ${this.grid.load()} when needed. You can check for reference the code created by our templates.

I'm REALLY new, so I don't fully follow.
Right now, I have this INVOKE code in 3 places.
Manual Refresh Button (on Click)
Radio Buttons (on Change)
Search Filter (on Change)
image

So if you could help just a tiny bit more...
is there a place to put "common code" or a function() ?
... so I could call it from all 3 places?
I wasn't taking time to load the grid when the page loads - user would rarely need All Records. But I'll try to see if I can try this ${this.grid.load()}