tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

JqGrid data collapse in column #937

Closed Kasilingam1230 closed 4 years ago

Kasilingam1230 commented 5 years ago

If I add same column twice, first as hidden: false, id: 3 & second one with hidden: true, id: 4 my JqGrid collapse in column sort followed by an field sort. I'm using jquery-ui-sortable library for column sort.

Kasilingam1230 commented 5 years ago
$("#jqGrid").jqGrid({
                url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&qwery=longorders',
                mtype: "GET",
                datatype: "jsonp",
                colModel: [
                    { label: 'OrderID', name: 'OrderID', key: true, hidden: true, width: 75 },
                    { label: 'OrderID', name: 'OrderID', key: true, hidden: false, width: 75 },
                    { label: 'Customer ID', name: 'CustomerID', hidden: false, width: 150 },
                    { label: 'Order Date', name: 'OrderDate', hidden: false, width: 150,
                    formatter : 'date', formatoptions: { srcformat : 'Y-m-d H:i:s', newformat :'ShortDate'}},
                    { label: 'Freight', name: 'Freight', width: 150 },
                    { label:'Ship Name', name: 'ShipName', hidden: false, width: 150 }
                ],
                sortable: {
                                exclude: [],
                                update: function( event, ui ) {}
                },
        viewrecords: true,
                width: 780,
                height: 250,
                rowNum: 20,
                pager: "#jqGridPager"
            });
tonytomov commented 5 years ago

Sorry, but I'm not sure that I understand the problem. How do you add column 3 and 4?!?