2013-11-22 28 views
0

我正在使用Jqgrid 4.5。我的網格使用javascript在頁面加載時很好地綁定。我啓用虛擬滾動,但當我向下滾動頁面不向服務器發出新的請求。它無所事事。只需堅持頁面加載時的記錄即可。我不知道我要去哪裏錯我使用網上找到的每一個解決方案,但無法工作。我codefor結合的jqGrid是:Jqgrid 4.5 virtaul滾動不向下滾動發送請求

jQuery("#list2").jqGrid(
     { 
      url: '../ReportsLoadService.asmx/GetPublishHistory', 
      datatype: "json", 
      ajaxGridOptions: { contentType: "application/json" }, 
      mtype: "POST", 
      postData: 
      { 
       //Sortby: Sortby, 
        //sidx: sidx, 
        //page: page, 
        //rows: rows, 
       PostProfileId: PostProfileId, 
       startdate: startdate, 
       starttime: starttime, 
       enddate: enddate, 
       endtime: endtime, 
       ServiceName: ServiceName, 
       Url: Url, 
       UrlTitle: UrlTitle, 
       Status: Status, 
       DateOption: DateOption 
      }, 
      serializeGridData: function(data) { 
       return JSON.stringify(data); 
      }, 
      colNames: [ 
       'Service Name', 'Title', 'Schedule Date', 'Status', 'Posting Error' 
      ], 
      colModel: [ 
       { 
        name: 'ServiceName', 
        index: 'ServiceName', 
        resizable: false 
       }, 
       { 
        name: 'Title', 
        index: 'Title', 
        formatter: 'showlink', 
        formatoptions: { baseLinkUrl: 'Url', addParam: '', idName: '' }, 
        resizable: false 
       }, 
       { 
        name: 'ScheduleDate', 
        index: 'ScheduleDate', 
        align: 'center', 
        resizable: false 
       }, 
       { 
        name: 'Status', 
        index: 'amount', 
        resizable: false 
       }, 
       { 
        name: 'PostingError', 
        index: 'PostingError', 
        resizable: false 
       } 
      ], 

      jsonReader: { 
       root: "d.Records", 
       page: "d.CurrentPage", 
       //records: "d.TotalRecords", 
       repeatitems: false 
      }, 
      rowNum: 50, 
      rownumbers: true, 
      //rowList: [20, 30, 50], 
      //sortname: "Title", 
      //rowTotal: 2000, 
      pager: '#pager2', 

      viewrecords: true, 
      sortorder: "desc", 
      //height: "100%", 
      //autowidth: true, 
      scroll: 1, 
      loadonce: false, 
      gridview: true, 
      prmNames: { npage: 1 } 
     }); 

點我哪裏做錯了,因爲我的要求,需要虛擬滾動,我不能使它發揮作用。

+0

我的腳本的順序是: <鏈路HREF = 「JS /插件/的jqGrid/CSS/UI的亮度/ jquery的-UI-1.9.2.custom.css」 的rel = 「樣式表」/> <鏈接href =「js/plugins/jqGrid/css/ui.jqgrid.css」rel =「stylesheet」/>

+0

我使用的jQuery 1.8.3 –

+0

我解決了它我自己我是在設置的jqGrid這是錯誤的分頁選項爲什麼造成它的問題。現在它工作正常。 –

回答

0

我解決了它我的自我我在jqgrid設置錯誤的分頁選項,這就是爲什麼它的創建問題。現在它工作正常。