问题描述
所以我在使用 datagrid easyui 时遇到了问题。
请看一下这个 var_dump json 编码:
string(93) "{"total":1,"rows":[{"name":"Trinurtjahjo Sutjipto","code":"OP","result":95}]}"
尝试使用 datagrid jquery easyui 调用数据时出现此错误:
Uncaught TypeError: Cannot read property 'total' of null
这是我的 html 代码:
<table id="dg" title="Rekap KPI" class="easyui-datagrid"
style ="width:auto;height:400px"
url ="<?PHP echo (base_url('rekapkpi/getData'));?>" toolbar="#toolbar"
pagination="true"
rownumbers="false"
fitColumns="true" singleSelect="true"
checkBox ="true" striped="true"
remoteSort="false"
Nowrap ="false">
<thead>
<tr>
<th data-options="field:'namakaryawan',width:100">NAMA
KARYAWAN</th>
<th data-options="field:'kpi_divisi',width:100">DIVISI</th>
<th data-
options="field:'hasilBSc',width:100,align:'right'">NILAI KPI</th>
</tr>
</thead>
</table>
当我通过inspect element>network检查url时,没有返回json编码。 我试图遵循 this 但结果是“没有错误”。但为什么我的 json 编码返回空?
我也试过 this 但仍然
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)