How to make data from temporary table available in form’s grid

Code in form’s outer scope:


TmpTable 	tmpTable;
FormRun        formRun;
;
...
// Fill tmpTable with data here
…
args.record( tmpTable );
formRun = classFactory.formRunClass( args );
formRun.init();
formRun.run();
formRun.detach();
formRun.wait();
if( formRun.closedOk() )
{
	…
// Process data from tmpTable updated in form here
	…
}

Code in form, in the temporary table datasource – TmpTableDS:


public void init()
{
    TmpTable 	tmpTable;
    ;

    tmpTable = element.args().record();

    super();

    TmpTableDS.setTmpData( tmpTable );
}