1
열 정렬이 발생할 때 JQGrid 레코드 손실 문제가 있습니다. (400 개) 레코드가있을 경우 정렬이 발생할 때, 예를 들어, 레코드 수가 데이터는 폼 자체에 저장된 JSON 어레이로부터 채워진다 20JQGrid가 열 정렬 레코드를 잃습니다.
$("#grdCaseFind").jqGrid({
datatype: "local",
height: 250,
colNames:['SeqNo', 'Report Title', 'Location', 'Status', 'Date', 'Officer Name', 'Incident No.'],
colModel:[
{name:'SeqNo',index:'SeqNo', hidden:true},
{name:'RepTitle',index:'RepTitle', align:"center", width:200},
{name:'CaseAddr',index:'CaseAddr', align:"center", width:200},
{name:'RepStatus',index:'RepStatus', align:"center", width:50},
{name:'CaseBeginDate',index:'CaseBeginDate', width:70, align:"center"},
{name:'RepOfficerName',index:'RepOfficerName', width:100, align:"center"},
{name:'IncidentNo',index:'IncidentNo', width:80, align:"center"},
],
multiselect: false,
caption: "",
onSelectRow: function (rowid, status) {
if (status === false) {
$(this).resetSelection();
$("#btnOpen").attr("disabled", true);
} else {
$("#btnOpen").attr("disabled", false);
$("#CaseSelectedIndex").val($("#grdCaseFind").getCell(rowid, "SeqNo"))
}
},
ondblClickRow: function (rowid, iRow, iCol, e) {
document.getElementById("btnOpen").click();
},
onSortCol: function (index, iCol, sortoder) {
$("#btnOpen").attr("disabled", true);
}
});
떨어진다.
grdCaseFindData = strFindResult.grdCaseFind;
$(grdCaseFindData).each(function (i, e) {
$("#grdCaseFind").addRowData(i + 1, e);
$("#grdCaseFind").attr("rowNum", i + 1);
});
나는 전에이 문제로 달리고, 기록을 계산하고 "ROWNUM"속성을 설정하여, 문제가 수정되었습니다. 내 다른 그리드에서 유일한 차이점은 JSON 배열을 반환하는 서버 호출을 통해 레코드를로드한다는 것입니다. 이 그리드가 다른 것과 같이 행동하지 않는 이유에 대한 아이디어가 있습니까?