Every event has context and/or event.target which can be used to get reference to appropriate grid.
Let's say there is a toolbar for a detail grid.
When a filter button is clicked in that toolbar, reference to grid can be obtained by
var $grid = $( event.target ).closest( ".pq-grid" );