We can create the grid manually with javascript and invoke the export command with custom export.
Try to filter records and then export it - now we export only the filtered records.
<?php 
require_once '../../../../php/demo/tabs.php';
?>
<!DOCTYPE html>
<html>
  <head>
    <title>jqGrid PHP Demo</title>
    <link rel="stylesheet" type="text/css" media="screen" href="../../../../css/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="../../../../css/trirand/ui.jqgrid.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="../../../../css/ui.multiselect.css" />
    <style type="text">
        html, body {
        margin: 0;            /* Remove body margin/padding */
        padding: 0;
        overflow: hidden;    /* Remove scroll bars on browser window */
        font-size: 75%;
        }
        
    </style>
    <script src="../../../../js/jquery.min.js" type="text/javascript"></script>
    <script src="../../../../js/trirand/i18n/grid.locale-en.js" type="text/javascript"></script>
         <script src="../../../../js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script> <script type="text/javascript">         
    $.jgrid.no_legacy_api = true;
    $.jgrid.useJSON = true;
    $.jgrid.defaults.width = "700";
    </script>
     
    <script src="../../../../js/jquery-ui.min.js" type="text/javascript"></script>
         <script src="../../../../js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script> <script type="text/javascript">         
        jQuery(document).ready(function($) {
            jQuery('#grid').jqGrid({
                "width":"700",
                "hoverrows":false,
                "viewrecords":true,
                "jsonReader":{"repeatitems":false},
                "gridview":true,
                "url":"grid.php",
                "editurl":"grid.php",
                "cellurl":"grid.php",
                "rowNum":10,
                "rowList":[10,20,30],
                "sortname":"OrderID",
                "caption":"PDF export",
                "datatype":"json",
                "colModel":[
                    {"name":"OrderID","index":"OrderID","sorttype":"int","key":true,"editable":true},
                    {"name":"OrderDate","index":"OrderDate","sorttype":"datetime","formatter":"date","formatoptions":{"srcformat":"Y-m-d H:i:s","newformat":"m\/d\/Y"},"search":false,"editable":true},
                    {"name":"CustomerID","index":"CustomerID","sorttype":"string","editable":true},
                    {"name":"ShipName","index":"ShipName","sorttype":"string","width":"250","editable":true},
                    {"name":"Freight","index":"Freight","sorttype":"numeric","label":"Test","align":"right","editable":true}
                ],
                "postData":{"oper":"grid"},
                "loadError":function(xhr,status, err){ 
                    try {jQuery.jgrid.info_dialog(jQuery.jgrid.errors.errcap,'<div class="ui-state-error">'+ xhr.responseText +'</div>', jQuery.jgrid.edit.bClose,{buttonalign:'right'});} 
                    catch(e) { alert(xhr.responseText);} },
                "pager":"#pager"
            });
            jQuery('#grid').jqGrid('navGrid','#pager',{"edit":false,"add":false,"del":false,"search":true,"refresh":true,"view":false,"excel":false,"pdf":true,"csv":false,"columns":false});
            jQuery('#grid').jqGrid('navButtonAdd','#pager',{
                id:'pager_pdf',
                caption:'',
                title:'Export To Pdf',
                onClickButton : function(e)    {
                    try {
                        jQuery("#grid").jqGrid('excelExport',{tag:'pdf', url:'export.php'});
                    } catch (e) {
                        window.location= 'export.php?oper=pdf';
                    }
                }, 
                buttonicon:'ui-icon-print'
            }); 
        });    
    </script>
  </head>
  <body>
      <div>
          <table id="grid"></table>
          <div id="pager"></div>
      </div>
      <br/>
      <?php tabs(array("export.php","grid.php"));?>
   </body>
</html>
export.php.
<?php
require_once '../../jq-config.php';
// include the jqGrid Class
require_once ABSPATH."php/jqGrid.php";
// include the driver class
require_once ABSPATH."php/jqGridPdo.php";
// LOAD lang file
require_once(ABSPATH.'/php/tcpdf/config/lang/eng.php');
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);

// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");
// Create the jqGrid instance
$grid = new jqGridrender($conn);
// Write the SQL Query
$grid->SelectCommand 'SELECT OrderID, OrderDate, CustomerID, ShipName, Freight FROM orders';
$grid->setColModel();
// we want to export additinal data when excel
$grid->renderGrid('#grid','#pager',truenullnulltrue,true);
?>
grid.php.
<?php
require_once '../../jq-config.php';
// include the jqGrid Class
require_once ABSPATH."php/PHPSuito/jqGrid.php";
// include the driver class
require_once ABSPATH."php/PHPSuito/DBdrivers/jqGridPdo.php";
// LOAD lang file
require_once(ABSPATH.'/php/tcpdf/config/lang/eng.php');
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);

// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");

// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand 'SELECT OrderID, OrderDate, CustomerID, ShipName, Freight FROM orders';
// Set output format to json
$grid->dataType 'json';
// Let the grid create the model
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
// Set some grid options
$grid->setGridOptions(array(
    
"rowNum"=>10,
    
"rowList"=>array(10,20,30),
    
"sortname"=>"OrderID",
    
"caption"=>"PDF export"
));
// Change some property of the field(s)
$grid->setColProperty("OrderDate", array(
    
"formatter"=>"date",
    
"formatoptions"=>array("srcformat"=>"Y-m-d H:i:s","newformat"=>"m/d/Y"),
    
"search"=>false
    
)
);
$grid->setColProperty("ShipName", array("width"=>"250"));
$grid->setColProperty("Freight", array("label"=>"Test""align"=>"right"));
if(
$grid->oper == "pdf") {
    
$grid->setPdfOptions(array(
        
// reprint table header 
        
"shrink_cell"=>false,
        
"reprint_grid_header" => true
        
));
}

// Enable navigator
$grid->navigator true;
// Enable excel export
$grid->setNavOptions('navigator', array("pdf"=>true,"add"=>false,"edit"=>false,"del"=>false,"view"=>false"excel"=>false));
// Enjoy

$grid->renderGrid('#grid','#pager',truenullnulltrue,true);