代码之家  ›  专栏  ›  技术社区  ›  Rigobert Song

jqGrid在加载时卡住了吗?

  •  3
  • Rigobert Song  · 技术社区  · 16 年前

    jqGrid

    我将在下面向网格传递一个JSON对象 format

    {
        "total":1,
        "page":1,
        "records":10,
        "rows":
            [{
            "i":1,"cell":["foo","bar"]},
               {"i":2,"cell":["foo1","barr"]},
               {"i":3,"cell":["foo2","barrr"]}]
    }
    

    jQuery("#searchResults").jqGrid({
                        url: '/Customer/SearchResults/',
                        datatype: 'json',
                        mtype: 'GET',
                        colNames: ['Surname', 'Forename'],
                        colModel: [
                          { name: 'Surname', index: 'Surname', width: 200, align: 'left' },
                          { name: 'Forename', index: 'Forename', width: 200, align: 'left'}],
                        pager: jQuery('#pager'),
                        rowNum: 10,
                        rowList: [5, 10, 20, 50],
                        sortname: 'Id',
                        sortorder: "desc",
                        viewrecords: true,
                        imgpath: '/scripts/themes/coffee/images',
                        caption: 'My first grid'
                    });
    

    它击中了我的动作,但网格在加载时卡住了,你知道我做错了什么吗??

    3 回复  |  直到 16 年前
        1
  •  6
  •   Craig Stuntz    16 年前
        2
  •  0
  •   Joe Mitchell    13 年前

        3
  •  -1
  •   Dharti Sojitra    9 年前