在JQgrid中导出pdf时出错

在JQgrid中导出pdf时出错,jqgrid,jqgrid-formatter,jqgrid-php,Jqgrid,Jqgrid Formatter,Jqgrid Php,我想以pdf文件的形式导出详细信息。pdf文件已下载,但只有标题表示产品、数量、价格、总数,只有缺少内容主体表示产品详细信息 $("#list_records_view").jqGrid({ url: "view.php?name="+sample, datatype: "json", mtype: "GET", colNames: ["Product", "Price

我想以pdf文件的形式导出详细信息。pdf文件已下载,但只有标题表示产品、数量、价格、总数,只有缺少内容主体表示产品详细信息

$("#list_records_view").jqGrid({
                url: "view.php?name="+sample,
                datatype: "json",
                mtype: "GET",
                colNames: ["Product", "Price", "Qty", "Total", "Date"],
                colModel: [ 

                    { name: "product" },
                    { name: "price" },
                    { name: "qty" },
                    { name: "total" },
                    { name: "date" }


                ],
                pager: "#perpageview",
                rowNum: 10,
                rowList: [10,20],
                sortname: "id",
                sortorder: "asc",
                height: 200,
                width: 780,
                viewrecords: true,
                //loadonce: true, 
                gridview: true,
               //editurl: "clientArray",
                caption: ""

            }); 
            $("#export").on("click", function(){
                    $("#list_records_view").jqGrid("exportToPdf",{
                        title: 'Customer Report',
                        orientation: 'portrait',
                        pageSize: 'A4',
                        description: 'Purchase Report',
                        customSettings: null,
                        download: 'download',
                        includeLabels : true,
                        includeGroupHeader : true,
                        includeFooter: true,
                        fileName : "jqGridExport.pdf"
                    })
                });

仅当datatype设置为local或loadonce参数设置为true时,才能导出为PDF、CSV和Excel

为了使导出成为可能,您需要取消对loadonce:true的注释并使其处于活动状态


有关导出功能的更多信息可以是:

I将loadonce参数设置为true,其工作正常。。非常感谢。:)