Kendo Grid: Getting An Instance In A Angular Directive
this follows directly on from this question (with an additional question hence I thought should be a new post?) The link above shows how to get a grid instance in Angular (thanks t
Solution 1:
Basically you do the same thing; you need to wait for the kendoRendered
event, e.g. like this (note that this example may not conform to angular best practices (re isolate scope etc.)):
functionPCKendo($timeout) {
functionlink(scope, element, attrs) {
scope.$on("kendoRendered", function (e) {
scope.$apply(function () {
scope.vm.setMessage("one col");
scope.grid.hideColumn(1);
});
$timeout(function () {
scope.$apply(function () {
scope.vm.setMessage("all cols");
scope.grid.showColumn(1);
});
}, 2000);
});
}
return {
link: link
}
}
(demo)
Post a Comment for "Kendo Grid: Getting An Instance In A Angular Directive"