我正在尝试在可扩展选项中绑定ui-grid。我能够获得数据但似乎具有约束力,我错过了一些东西。请有人建议
这是我的代码
- 控制器 -
[{
"Check_number": "116511",
"Check_date": "2012-11-21T00:00:00",
"Detail": [{
"Check_number": "116511",
"Voucher_number": "10000115",
"Invoice_number": "10000115",
"Invoice_date": "2017-03-23T16:03:38.303",
"Invoice_amount": 125.0,
"Vendor_number": "01234"
}, {
"Check_number": "116511",
"Voucher_number": "10000115",
"Invoice_number": "10000115",
"Invoice_date": "2017-03-23T16:03:38.303",
"Invoice_amount": 125.0,
"Vendor_number": "01234"
}]
}]
---来自webmethod的json数据
<div ng-controller="MainCtrl" ng-app="app">
<div class="control-group">
<input type="button" class="btn btn-small" ng-click="expandAllRows()" value="Expand All"/>
<input type="button" class="btn btn-small" ng-click="collapseAllRows()" value="Collapse All"/>
</div>
<div ui-grid="gridOptions" ui-grid-pinning ui-grid-expandable class="grid"></div>
</div>
---------- aspx page
{{1}}
答案 0 :(得分:0)
$ scope.gridOptions.data ='resultdata';