关于easyui绑定数据的问题
我的接口返回的是一个省份数据,格式如下:
{
"code": "200",
"data": [
{
"code": "110000",
"id": "1",
"name": "北京市"
},
{
"code": "120000",
"id": "2",
"name": "天津市"
},
..............................
HTML
-------------------------------
<table id="tt" class="easyui-datagrid" url="../api/Province.ashx" idField="id" rownumbers="true" fitColumns="true" singleSelect="true" style="width:800; height:auto">
<thead>
<tr>
<th field="code" width="50">Col 1</th>
<th field="name" width="50">Col 2</th>
<th field="id" width="50">Col 3</th>
</tr>
</thead>
</table>
-----------------------field如何设置?谢谢。