How to refresh list page and do not lost focus in grid?

I am opening detail of an item in list page grid. There may be some changes so after detail is close() I and refreshing the list page datasource.

I am acessing the list page datasource from arguments

FormDataSource callerDataSource;

callerDataSource = element.args().record().dataSource();

But I can obtain one of following results.

  1. I reread() the current record.

callerDataSource.reread();

The data in grid are changed but the form parts do not refresh.

  1. I research(true) the datasource

callerDataSource.research(true);

I try even this version of research

callerDataSource.reread();

callerDataSource.rereadReferenceDataSources();

callerDataSource.research(true);

but I lost focus in grid.

  1. I call task F5 by

#Task

Element.args().caller().task(#taskF5);

but the focus is lost here too.

I would like to have new data in grid and in form part but do not lost focus in grid. (Refreshing of only selected record and info parts which depends on it will be enough.)

The table has primary index selected. It is recid (which is not shown in grid).

How can I do it?

Never mind I find this blog http://devexpp.blogspot.com.br/2012/02/refresh-datasource-and-retain-position.html

My solution is use the position

FormDataSource callerDataSource;
int position;
callerDataSource = element.args().record().dataSource();

position = callerDataSource.getPosition();
callerDataSource.reread();
callerDataSource.research(true);
callerDataSource.setPosition(position);