e-columns="columns"
class="gridStyle"
e-allowresizing="true"
e-allowkeyboardnavigation="true"
e-allowscrolling="true"
e-allowsorting="true"
e-minwidth="550"
e-isresponsive="true"
e-scrollsettings-height="320"
e-allowgrouping="true"
e-groupsettings-groupedcolumns="targetGroupColumn"
e-allowfiltering="true"
e-filtersettings-filtertype="menu"
e-actioncomplete="complete"
e-create="complete"
e-enabletouch="false">
angular.module("administrationModule")
.controller("targetsController", ["$scope", "$http", "targetService", "$filter", "$compile", "$rootScope", function ($scope, $http, targetService, $filter, $compile, $rootScope) {
$scope.status = { open: true };
$rootScope.data = null;
$rootScope.accessGroupData = null;
$scope.columns = [
{ field: "targetNumber", headerText: administrationSecurityResources.targetNumber, width: 100 },
{ field: "targetType", headerText: administrationSecurityResources.targetType, width: 100 },
{ field: "targetName", headerText: administrationSecurityResources.targetName, width: 100 },
{ field: "targetDescription", headerText: administrationSecurityResources.description, width: 100 },
{ field: "accessGroupMarking", headerText: administrationSecurityResources.accessGroup, template: "true", templateID: "#accessGroupTemplate", width: 120 },
];
$scope.targetGroupColumn = ["targetType"];
$scope.compile = function (el) {
$compile(el)($scope);
}
$scope.complete = function (args) {
if (!this.initialRender) {
$scope.compile($(".drpAccessGroup"))
}
};
$scope.setTargetList = function (targetList) {
$rootScope.data = targetList.targetViewModelList;
$rootScope.data = $filter('orderBy')($rootScope.data, 'targetName');
$rootScope.accessGroupData = $filter('orderBy')(targetList.accessGroupMarkingViewModelList, 'markingString');
$rootScope.accessGroupData.splice(0, 0, { markingString: "Unrestricted" });
}
Waiting for your quick reply
};
}]);