0

現在、私は jqgrid で 1 つの問題に直面しています。ajax呼び出しを使用してグリッドをロードした後、グリッド完了時にデータ型をローカルに変更しています。その後、フィルタリングしようとしていますが、レコードがゼロになっています。どんな助けでも大歓迎です。

以下は私のコードです: -

$("#orderformtable").jqGrid(
            {
                url : "getOrderFormProductList.htm?VENDORID=" + VENDORID
                        + "&LOCATIONID=" + LOCATIONID,
                mtype : 'GET',
                datatype : "json",
                colNames : [ 'Product', 'Pipeline Qty.', 'A', 'B', 'C',
                        'D', 'Order Qty.' ],
                colModel : [ {
                    name : 'PRODUCT_NAME',
                    index : 'PRODUCT_NAME',
                    width : 80,
                    editable : false,
                    hidden : false,
                    editrules : {
                        required : true
                    },
                    editoptions : {
                        disabled : true,
                        size : "40",
                        maxlength : "70"
                    }

                }, {
                    name : 'PIPELINE_QTY',
                    index : 'PIPELINE_QTY',
                    width : 20,
                    editable : false,
                    editoptions : {
                        size : "7",
                        maxlength : "6"
                    },
                    editrules : {
                        required : true
                    },
                    align : 'center'
                }, {
                    name : 'MAX_QTY',
                    index : 'MAX_QTY',
                    width : 15,
                    editable : true,
                    editoptions : {
                        size : "7",
                        maxlength : "6"
                    },
                    editrules : {
                        required : true
                    },
                    align : 'center'
                }, {
                    name : 'INSTOCK_QTY',
                    index : 'INSTOCK_QTY',
                    width : 20,
                    editable : false,
                    editoptions : {
                        size : "7",
                        maxlength : "6"
                    },
                    editrules : {
                        required : true
                    },
                    align : 'center'
                }, {
                    name : 'VENDOR_PIPELINE',
                    index : 'VENDOR_PIPELINE',
                    width : 20,
                    editable : false,
                    editoptions : {
                        size : "7",
                        maxlength : "6"
                    },
                    editrules : {
                        required : true
                    },
                    align : 'center'
                }, {
                    name : 'REQUIRED_QTY',
                    index : 'REQUIRED_QTY',
                    width : 20,
                    editable : false,
                    editoptions : {
                        size : "7",
                        maxlength : "6"
                    },
                    editrules : {
                        required : true
                    },
                    align : 'center'
                }, {
                    name : 'REORDER_QTY',
                    index : 'REORDER_QTY',
                    width : 20,
                    editable : true,
                    search : false,
                    editoptions : {
                        size : "7",
                        maxlength : "6"
                    },
                    editrules : {
                        required : true
                    },
                    align : 'center'
                } ],
                loadonce : true,
                localReader : {
                    repeatitems : true
                },
                hidegrid : false,
                postData : {},
                rowNum : 200,
                rowList : [ 200, 220, 230 ],
                height : 500,
                autowidth : true,
                rownumbers : true,
                pager : '#orderformpagination',
                sortname : 'PRODUCT_NAME',
                viewrecords : true,
                gridview : true,
                sortorder : "asc",
                caption : "",
                emptyrecords : "Empty records",
                loadonce : false,
                gridComplete : function() {
                    $("#orderformtable").setGridParam( {
                        datatype : 'local',
                        ignoreCase : true
                    });
                },
                loadComplete : function() {

                    var rowid = jQuery("#orderformtable").jqGrid(
                            'getDataIDs');
                    for ( var i = 0; i < rowid.length; i++) {

                        $('#orderformtable').jqGrid('editRow', rowid[i]);
                    }
                }
            });

以下は私の jsonarray 再調整されたフォームコントローラーです:-

{
"total": 1,
"rows": [
    {
        "cell": [
            "Ball Pen",
            4,
            100,
            10,
            0,
            90
        ],
        "id": "1220"
    },
    {
        "cell": [
            "BATTERY DURACELL 9V PER PC",
            1,
            50,
            10,
            0,
            40
        ],
        "id": "1101"
    },
    {
        "cell": [
            "Brown Tape 2 inch per pc",
            0,
            30,
            10,
            0,
            20
        ],
        "id": "1108"
    },
    {
        "cell": [
            "CELLO TAPE 1 INCH- PER PC",
            0,
            80,
            10,
            0,
            70
        ],
        "id": "1115"
    },
    {
        "cell": [
            "CUTTER PAPER MEDIUM",
            0,
            25,
            10,
            0,
            15
        ],
        "id": "1122"
    },
    {
        "cell": [
            "Scissor big (per pc)",
            0,
            0,
            0,
            0,
            0
        ],
        "id": "1199"
    }
],
"records": 6,
"page": 1

}

4

1 に答える 1