tonytomov / jqGrid

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

Row number beginning from 2. #1063

Closed hp3423 closed 1 month ago

hp3423 commented 2 months ago

Row number beginning from 2

tonytomov commented 2 months ago

Please provide enough information like demo code Guriddo version and browser

hp3423 commented 2 months ago

$("#jqGrid").jqGrid({
        url: "roleQuery.do",
        ajaxGridOptions: {
            "type": "POST",
            "async": true,
            complete: function (xhr, status, errorThrown) {
                ajaxComplete(xhr, status, errorThrown);
            }
        },
        mtype: "POST",
        styleUI: 'Bootstrap',
        datatype: "json",
        colModel: [{
            label: '角色ID',
            name: 'roleId',
            width: 75,
            hidden: true,
            search: false
        }, {
            label: '角色名称',
            name: 'roleName',
            width: 75,
            hidden: false,
            search: true
        }, {
            label: '角色描述',
            name: 'roleDesc',
            autosize: false,
            width: 150
        }, {
            label: '创建时间',
            name: 'createTime',
            datefmt: 'Y-m-d H:i:s',
            sorttype: 'date',
            searchoptions: {
                dataInit: function (element) {
                    dateInit(element);
                },
                sopt: ["ge", "le", "eq"]
            },
            autosize: false,
            width: 150,
            editable: false,
        }
        ],
        colMenu: false,
        colOptions: {sorting: true, columns: true, filtering: false, seraching: false, grouping: false, freeze: true},
        autoResizing: true,
        autowidth: true,
        cellEdit: false,
        cellsubmit: "clientArray",
        editable: true,
        editurl: 'clientArray',
        validationCell: function (elem, error, iRow, iCol) {
            validationFailed(elem, error, iRow, iCol);
        },
        rownumbers: true,
        editNextRowCell: true,
        multiselect: false,
        multiSort: true,
        scrollrows:true,
        height: 350,
        viewrecords: true,
        rowList: [20, 40, 60, 80],
        rowNum: 20,
        pager: "#jqGridPager" 
});
`

on v5.8.5 is right(pic1),but on v5.8.6 the beginning row number is 2(pic2)
browser is Microsoft Edge
version 124.0.2478.97  (64)
[![pkeOMa4.jpg](https://s21.ax1x.com/2024/05/13/pkeOMa4.jpg)](https://imgse.com/i/pkeOMa4)
[![pkeOKZF.jpg](https://s21.ax1x.com/2024/05/13/pkeOKZF.jpg)](https://imgse.com/i/pkeOKZF)
hp3423 commented 2 months ago

The other codes are the same, but the issue occurred when the version of jqgrid was changed

tonytomov commented 2 months ago

Thanks. Fixed.

hp3423 commented 1 month ago

Thanks