Put code on your page to initialize the first grid for the by-default expanded accordion item. Use the beforeActivate
event of the accordion to trigger the initialization of the flexigrid for this panel.
$( ".selector" ).accordion({
beforeActivate: function( event, ui ) {}
});
Use this event to grab some variable based on the panel that is to be opened that will determine which url you will use. Add other safeguards as necessary (is table already loaded, don't expand panel until table finished loading, etc).