当姓氏为空时,我无法在网格中添加蓝色。
我正在使用Kendo网格,我不太熟悉如何在kendo行模板中编写角度代码。
答案 0 :(得分:0)
您只需将stringfied对象传递给Style
列中可用的<td ng-style= "#: Style && JSON.stringify(Style) #">
#: Surname #
</td>
vm.allGroupsInClassifications = [];
datacontext.graph.getAllGroups().then(function (data) {
var groups = [];
// get all clasification names and put them in the array and create a new array
for (var k in vm.classificationNames) {
var groupName = vm.classificationNames[k];
groups[groupName] = new Array();
}
// go through all the groups and sort them based on their classification
for (var i = 0; i < data.length; i++) {
if (data[i].classification != null) {
modifyGroupContent(data[i], groups, 0);
}
else if (data[i].classification == null)
modifyGroupContent(data[i], groups, 1);
}
vm.allGroupsInClassifications = groups;
console.log(vm.allGroupsInClassifications);