jqGrid not displaying JSON data

前端 未结 6 2095
暗喜
暗喜 2021-01-21 02:11

I\'m hoping to use jqGrid for a current web project that I\'m working on. The problem is, I can\'t seem to get the JSON data to be displayed by the grid. Here is the grid\'s ini

6条回答
  •  执念已碎
    2021-01-21 03:01

    Maybe it's just a matter of quote or double-quote. It's quite sensitive. In there example :

    jQuery("#list5").jqGrid({ url:'server.php?q=2', 
    datatype: "json", 
    colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'], colModel:[ {name:'id',index:'id', width:55}, {name:'invdate',index:'invdate', width:90}, {name:'name',index:'name', width:100}, {name:'amount',index:'amount', width:80, align:"right"}, {name:'tax',index:'tax', width:80, align:"right"}, {name:'total',index:'total', width:80,align:"right"}, {name:'note',index:'note', width:150, sortable:false} ], rowNum:10, ......
    

提交回复
热议问题