jqgrid
  • jqgrid-asp.net
  • mvcjqgrid
  • 2014-09-13 3 views 0 likes 
    0

    Jqgrid가 데이터를로드 할 수 있습니다. 하지만로드 될 때 오류가 발생합니다.그리드가로드 될 때 jqgrid에 오류가 발생합니다.

    오류에 린 아래에있다 -있는 jqGrid 분 버전 :

     <script src='@Url.Content("~/Scripts/jqgrid/jquery-1.10.2.min.js")' type="text/javascript"></script> 
    <script src='@Url.Content("~/Scripts/jqgrid/i18n/grid.locale-en.js")' type="text/javascript"></script> 
    <script src='@Url.Content("~/Scripts/jqgrid/jquery.jqGrid.min.js")' type="text/javascript"></script> 
    

    난 그냥 붙어 있어요 제발 도와주세요 : 말

    k=b.jgrid.formatter.integer||{} unable to get property of undefined null reference

    레이아웃은 다음과 같은 스크립트 파일을 포함하고있다. 그리고 3 시간을 보냈다.

    나는 google이고, syas, locale이 추가되지 않았거나 첫 줄에 추가되는 많은 링크를 발견했다. 그러나 여전히 성공하지 못했다.

      $('#CategoriesGrdList').jqGrid({ 
          ajaxGridOptions: { 
           error: function() { 
            $('#CategoriesGrdList')[0].grid.hDiv.loading = false; 
            alert('An error has occurred.'); 
           } 
          }, 
          url: '@Url.Action("GetAllCategoriesList", "Categories")/' + 0, 
          gridview: true, 
          autoencode: true, 
          //public JsonResult GetEnrolls(int adClassSchedID,DateTime attendanceDate,int adProgramID,int syCampusID) 
          postData: { categoryId: 1 }, 
          //postData: { categoryId: rowID, attendanceDate: $('#AttendanceDate').val(), adProgramID: $('#adProgramID').val(), syCampusID: $('#syCampusID').val() }, 
          datatype: 'json', 
          jsonReader: { root: 'List', page: 'Page', total: 'TotalPages', records: 'TotalCount', repeatitems: false, id: 'Id' }, 
          mtype: 'GET', 
          colNames: ['Id', 'Code', 'Description', 'IsActive'], 
          colModel: [ 
            { name: 'Id', index: 'Id', hidden: true }, 
           { name: 'Code', index: 'Code', width: 170 }, 
           { name: 'Description', index: 'Description', width: 170 }, 
          { name: 'IsActive', index: 'IsActive', width: 170 } 
          ], 
          pager: $('#CategoriesGrdPager'), 
          sortname: 'Code', 
          rowNum: 40, 
          rowList: [3, 3, 3], 
          width: '525', 
          height: '100%', 
          viewrecords: true, 
    
          beforeSelectRow: function (rowid, e) { 
           return false; 
    
          }, 
          sortorder: 'desc' 
         }).navGrid('#CategoriesGrdPager', { edit: false, add: false, del: false, search: false, refresh: false }); 
        }); 
    

    감사

    당신은 항상있는 jqGrid의 내부에 일부 오류가 발생하는 경우에 jquery.jqGrid.src.js 대신 jquery.jqGrid.min.js를 사용해야합니다 모든
    +0

    문제의 원인은 무엇입니까? – Oleg

    답변

    0

    첫째.

    grid.locale-en.js 또는 i18n 폴더의 다른 언어 관련 파일이 누락 된 것으로 보입니다. 언어 파일은 앞에jquery.jqGrid.min.js 또는 jquery.jqGrid.src.js 앞에 포함되어야합니다. grid.locale-en.js인지 여부는인지 실제로 확인해야합니다. 정의되지 않은 $.jgrid.formattergrid.locale-en.js이 누락되었음을 의미 할 수 있습니다 (here 참조).

    jqGrid 설명서의 HTML 파일 (특히 <head> 부분)과 the demo HTML file을 비교하는 것이 좋습니다.

    관련 문제