Search code examples
angularjskendo-uikendo-window

AngularJS Kendo Window Custom Action Event


Anyone using the Angular Kendo Window will be aware how scarce the documentation is for it.

I am trying to assign an event to the "Custom" action that can be passed into the Kendo Window Directive. The directive looks like so:

<div kendo-window="win2" k-options="options" k-title="'Test Title'"
     k-visible="false"
     k-content="{ url: '../scripts/app/test.html' }"
     k-on-close="testEvent();"></div>

The close event works fine but I can't work out how to assign a custom event, I was expecting to pass it in like this, for example:

<div kendo-window="win2" k-options="options" k-title="'Test Title'"
     k-visible="false"
     k-content="{ url: '../scripts/app/test.html' }"
     k-on-close="testEvent();"
     k-on-custom="customEvent();"></div>

The options variable on the controller look like this:

        $scope.options = {
            height: 175,
            width: 900,
            actions: ["Close", "Custom"],
            resizable: false
        };

Any ideas?


Solution

  • Telerik's response to this question is below. Their Kendow Window claims to Angular integrated, yet their solution is a JQuery hack to get this to work... For shame Telerik, for shame....

    Reponse:

    "Thank you for your interest in Kendo UI.

    The click events for the custom Window actions should be attached programmatically after the Window instance has been created. Please check...

    http://docs.telerik.com/kendo-ui/controls/layout/window/how-to/use-custom-action-icons

    http://docs.telerik.com/kendo-ui/AngularJS/global-events#upon-widget-creation-kendowidgetcreated

    Regards, Dimo"