当我使用angularjs进行绑定时,它可以正常工作,但是当使用DevExtreme时,它无法正常工作
这是函数getAll
//To Get All Records
function GetAllEntry() {
var promiseGet = GetAllEntryService.GetAllEntry();
promiseGet.then(function (pl) { $scope.GetAllEntry = pl.data },
function (errorPl) {
console.log('Some Error in Getting Records.', errorPl);
});
}
此表使用angularJS进行绑定
<tbody ng-repeat="entry in GetAllEntry">
<tr>
<td>
<input type="checkbox" value="">
</td>
<td>{{ entry.TICKET_NUMBER }}</td>
<td>{{ entry.REQUESTER }}</td>
<td>{{ entry.CATEGORY }}</td>
<td>{{ entry.SUBCATEGORY }}</td>
<td>{{ entry.SUBJECT }}</td>
<td>{{ entry.BODY }}</td>
<td>{{ entry.FILE_NAME }}</td>
<td>{{ entry.ASSIGNED_TO }}</td>
</tr>
</tbody>
&#13;
它的工作正常!
但是当使用devExtreme时:
$scope.dataGridOptions = {
dataSource: {
store: GetAllEntry()
},
columns: ['TICKET_NUMBER', 'REQUESTER', 'CATEGORY', 'SUBCATEGORY', 'SUBJECT', 'BODY', 'FILE_NAME', 'ASSIGNED_TO']
};
HTML中的:
<div>
<div id="gridContainer" dx-data-grid="dataGridOptions"></div>
</div>
它没有显示我的数据?我错过了什么代码添加到这个项目中?
参考:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular-sanitize.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script type="text/javascript" src="http://cdn3.devexpress.com/jslib/15.2.4/js/dx.webappjs.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn3.devexpress.com/jslib/15.2.4/css/dx.common.css" />
<link rel="stylesheet" type="text/css" href="http://cdn3.devexpress.com/jslib/15.2.4/css/dx.light.css" />