我在 ng-grid :
中有此表$scope.data = localStorageService.get('detail');
$scope.gridOptionsdetail = {
data: 'data',
displaySelectionCheckbox: false,
columnDefs: [
{field: 'order.positions.positionNumber', displayName:'Position',width: 70},
{field: 'order.supplierNumber', displayName:'Supplier Number',width: 130},
{field: 'order.positions.salesOrderNumber', displayName:'Sales order Number',width: 155},
{field: 'order.positions.article.articleName', displayName:'Article Name',width: 180},
{field: 'order.positions.article.catalogArticleNumber', displayName:'Catalog Article Number',width: 180},
{field: 'order.positions.article.catalogArticleColor', displayName:'Catalog Article Color',width: 180},
{field: 'order.positions.article.catalogArticleSize', displayName:'Catalog Article Size',width: 180},
{field: 'order.positions.article.sapMaterialNumber', displayName:'SAP Material Number',width: 160}
]
};
如您所见,我从localstorage获取详细数据,$ scope.data获取此数据:
[{"order":{"id":132290,"supplierNumber":600301,"catalogName":"CONLEYS","customerNumber":86796929,"orderNumber":132290,"orderDate":"2013-02-06+01:00","orderStatus":"IMPORTED_FROM_SAP","positions":{"id":"132290/positions/10","orderNumber":132290,"positionNumber":10,"salesOrderNumber":654322,"salesOrderPosition":10,"article":{"id":12345679,"catalogName":"CONLEYS","sapMaterialNumber":12345679,"articleName":"CONLEYS BLUE T-Shirt","catalogArticleNumber":6308082,"catalogArticleColor":"Blau","catalogArticleSize":"L"},"orderPrice":"29.90","discountUnit":"PERCENT","orderQuantity":1,"positionStatus":"IMPORTED_FROM_SAP"}},"route":"search","reqParams":null,"parentResource":{"route":"orders","parentResource":null},"restangularCollection":false}].
我在表格中正确收到了数据,但是当我添加此代码时:
enableCellSelection: true,
enableRowSelection: false,
enableCellEditOnFocus: true,
在我的 gridOptiondetail 中,当我点击一个单元格(或双击)时,我无法修改任何内容。
我还可以使用其他方法修改单元格中的数据吗?
p.s我使用ng-grid的1.9.0版本,因为版本高达2.0,我看不到数据。