I think it is line 4490 from (inside fn.remoteRequest):
if (that.loading) {
to
if (that.loading && that.xhr && typeof(that.xhr)==="function") {
When I re-open a jquery UI dialog that contains a pqGrid and load it with new data I get the attached error. The above code prevents that.
Also another different issue is to do with jQuery UI. If the grid is in a MODAL jquery UI dialog and a grid filter shows a popup grid for filter options, if that popup has an input filter, it won't work and you can't type anything into it. This is due to the jQuery UI screen mask that disables all keyboard and mouse events from going through it. As the popup is attached to the body which is below the mask (z-index doesn't count), it doesn't get the keyboard events as they are stopped by the mask. To overcome this I suggest making popup's parent the grid element (which is above the mask) and not the document body.
If you reply with jsFiddle template I'll build all the examples for you.