开发者

simple jqGrid implementation doesn't work

开发者 https://www.devze.com 2022-12-22 01:03 出处:网络
$(\"#list2\").jqGrid({ mtype: \'GET\', datatype: \'Arche.Search.ItemT\', colNames:[\'test1\',\'test2\', \'test3\'],
$("#list2").jqGrid({
            mtype: 'GET',
            datatype: 'Arche.Search.ItemT',
            colNames:['test1','test2', 'test3'],
            colModel:[
                {name:'ID',index:'ID', width:100,align:"center",key:true},
                {name:'Brand',index:'Name', width:90},
               开发者_高级运维 {name:'BrandID',index:'CurrentPrice asc, invdate', width:100},
            ],
            rowNum:10,
            rowList:[10,20,30],
            pager: '#pager2',
            sortname: 'id',
            viewrecords: true,
            sortorder: "desc",
            caption:"TEST jqGRID",
            multiselect: false
        });

        var datarow = {ID:"99",Brand:"2007-09-01",BrandID:"test3"};
        //$("#list2").addRowData(0,datarow);   <== this works very well.
        $("#list2")[0].addJSONData("{total: 1, page: 1, records: 1, rows : [ {id: '1', cell:['1', '2007-10-01', 'test']} ] }");

the code

$("#list2")[0].addJSONData("{total: 1, page: 1, records: 1, rows : [ {id: '1', cell:['1', '2007-10-01', 'test']} ] }");

doesn't show anything upon the jqGrid.

and also doesn't have an error.

I really can't find the reason why this doens't work..

and I have 1more question.

the question is JSON.parse() is grammertical error in my case.


Apparently there are issues with addJSONData: jqgrid-addjsondata-asp-net-2-0-ws

Are you sure that addRowData is not an option for you?

0

精彩评论

暂无评论...
验证码 换一张
取 消