$('#tt').datagrid({
url: 'GetDataJosn',
title: 'DataGrid',
width: 800,
height: 300,
pageSize: 10,
idField: 'productid',
fitColumns: true,
nowrap: false,
columns: [[ { field: 'productid', title: 'Product ID', width: 100,checbox:true, formatter:function(value,rec){ //返回一个需要table html代码这个里面有个checkbox类型数据行
return GetTableHTML(rec.productid,rec.itemid); } },
{ field: 'itemid', title: 'Item ID', width: 80 },
{ field: 'listprice', title: 'List Price', width: 80, align: 'right'} ]], });
红色部分需要指出,并且跟column的某一个属性相同