Extract grid query

Is there a way to extract the query currently used to display the rows in the grid including all of the set filters etc?

If you are using server side filters - the next can be used

grid.xmlLoader.filePath

It will contain last used query

thanks, perfect