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

LoadContentFrom firing too early.

1 Answer 173 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 20 Oct 2014, 02:58 PM
Hi, I have the following window:

@(Html.Kendo().Window()
    .Name("viewJobLogWindow")
    .Title("Quote: QXXXX")
    .LoadContentFrom("ViewJobLogWindowsContent", "Quotes")
    .Draggable()
    .Resizable()
    .Width(640)
    .Height(480)
    .Actions(actions => actions.Pin().Minimize().Maximize().Close())
    .Visible(false)
)

But I only want to show the window and call the "ViewJobLogWindowsContent" action upon some other event such as a button click (or in this case an image click).

I call the following JavaScript function when the user clicks an image (acting as a link):

function clickViewJobLogImage()
{
    var win = $("#viewJobLogWindow").data("kendoWindow");
     
    win.center();
    win.open();
}

The window is not visible when the page first loads but the "ViewJobLogWindowsContent" action is called and when the user clicks the image it correctly shows the window but it does not call the action again?

I need the window to just be defined but not loaded and then only call the action to load the content when the JavaScript function is called.


1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 21 Oct 2014, 03:09 PM
Hello Mark,

The loading of content is executed immediately. If you need to delay it until the window is opened, skip it from the configuration options, and use the refresh client-side method.

Regards,
Alex Gyoshev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Window
Asked by
Mark
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or