How to switch main grid of part item

Hi All,

I am trying to perform one action on part from tearoff window(open part tab) and at the result I want to display the related parts on main grid, I achieved the same, but if on TOC if any other grid is open(in background) and I am performing action on opened part then I am not able to switch part main grid.

How we can switch to part main grid?