This is a migrated thread and some comments may be shown as answers.

Find element in refresh or activate event

1 Answer 339 Views
Window
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 18 Jan 2017, 04:53 PM

Hello,

I'm creating an Kendo window with JavaScript and want to set the window title with a value from a Control from the
loaded Content in the refresh or activate Event - how to access Elements of the window Content?

 

$("<div id='win" + name + "' />").appendTo(document.body).kendoWindow({
        title: stitle,
        actions: ["Close"],
        draggable: false,
        resizable: false,
        modal: true,
        animation: {
            open: {
                effects: "slideIn:left",
                duration: 500
            },
            close: {
                effects: "slideIn:left",
                reverse: true,
                duration: 500
            },
        },
        visible: false,
        pinned: false,
        content: { url: surl, iframe: false },
        refresh: function (e) {
            $.validator.unobtrusive.parse("form");
        },
        activate: function(e) {
        },
        deactivate: function (e) {
            $(windowname).data("kendoWindow").destroy();
            e.sender.destroy();
        }
    });
    var window = $(windowname).data("kendoWindow");
    window.wrapper.addClass("gpdb-sidebar-window");
    window.open();

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 20 Jan 2017, 09:49 AM

Hello Robert,

You can use the content method to get the DOM contents of the Kendo Window. And to change the title of the widget you can use the title method.

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Ianko
Telerik team
Share this question
or