LoadContentFrom firing too early.

2 posts, 0 answers
  1. Mark
    Mark avatar
    90 posts
    Member since:
    Jul 2014

    Posted 20 Oct 2014 Link to this post

    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.


  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 21 Oct 2014 Link to this post

    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.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top