2016-11-18 6 views
1

나는 HTML 테이블에 형성된 Jquery 격자를 가지고있다.JQuery 격자 호출기가 보이지 않는다.

내가 페이지 Up 및 Page Down 버튼에는 표시되지 않습니다 (10)

내 페이지 크기를 설정 한 functionality.I 호출기를 포함하여 그리드에 필요한 속성을 추가했습니다.

내가 자세히 보았을 때, 나는 그것이 말하고있는 것을 발견했다. Page: 1 out of 1 그러나 오른쪽 구석에는 257 개의 레코드 중 1-10 개가 다시 말해있다. 여기

<table class="table table-bordered" id="tblJQGrid"></table> 
<div id="pager"></div> 

그리고 여기에 그리드 바인딩 코드입니다 HTML 태그를 aremy.

$("#tblJQGrid").jqGrid(
{url: "@Url.Action("GetGeographyBreakUpData", "GeoMap")"+ "?Parameters=" + Params + "", 
    datatype: "json", 
    //data: { "Parameters": Params }, 

    mtype: 'GET', 
    cache: false, 
    colNames: ['Id','GeoGraphy', 'Completed', 'InProgress'], 
    colModel: [ 
    { name: 'Id', index: 'Id', width: 20, stype: 'text',hidden:true }, 
    { name: 'Geography', index: 'Geography', width: 150 }, 
    { name: 'Completed', index: 'Completed', width: 150 }, 
    { name: 'InProgress', index: 'InProgress', width: 150 }, 
    ], 
    pager:'#pager', 
    jsonReader: {cell:""}, 
    rowNum: 10, 
    sortorder: "desc", 
    sortname: 'Id', 
    viewrecords: true, 

    caption: "Survey Status:Summary", 
    scrollOffset: 0}); 
    $("#tblJQGrid").jqGrid('navGrid','#pager',{search:true}); 

무엇이 잘못되었거나 잘못 되었습니까?

+1

jqGrid ([free jqGrid] (https : // github)의 fork **)에 대한 정보를 ** 모든 질문에 쓰는 것이 중요합니다. .com/free-jqgrid/jqGrid), 상업용 [Guriddo jqGrid JS] (http://guriddo.net/?page_id=103334) 또는 이전 jqGrid 버전이 4.7 이하인 경우). 서버 ('url')에서 반환 된 데이터 예제 (적어도 두 행 이상의 데이터)를 포함해야합니다. 아마 당신은 서버 쪽 페이징을 구현하지 않았을 것입니다. 257 행의 데이터에는 꼭 필요한 것은 아닙니다. 모든 데이터 *를 즉시 반환하고'loadonce : true, forceClientSorting : true' 옵션을 사용할 수 있습니다 – Oleg

답변

1

loadonce: true, forceClientSorting: true 옵션을 사용해보세요.