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

KendoUI launch a new modal window with content from a controller -> view

2 Answers 200 Views
Window
This is a migrated thread and some comments may be shown as answers.
Subramanian
Top achievements
Rank 1
Subramanian asked on 29 May 2013, 08:20 PM
Hi,
I have been trying to launch a window from a base page and the launch window content view will have to be from an action.
With the below code block, I'm getting a blank window, please help in this regard.
fyi... I have converted my existing application to KendoUI using the tool menu upgrade wizard.

<div id="divDocsUploadWindow">
    @(Html.Kendo().Window()
        .Name("DocsUploadWindow")
    .Title("Customer")    
     .Draggable()
    .Resizable()
    .Width(736)
    .Visible(false)
    .Modal(true)
    )
</div>     
the jquery portion:
 $("#btnOpenDocs ").click(function () {           
        var windowWidget = $("#DocsUploadWindow").data("kendoWindow");
        windowWidget.refresh({
             url: "@Url.Action("UploadViewAction", "UploadController")"
        });
        windowWidget.center();
        windowWidget.open();            
    });

view:
@model Models.UploadFile
@{
    ViewBag.Title = "Upload";
}
<h2>_Upload</h2>
<label>test</label>
@(Html.Kendo().Upload()
        .Name("attachments")       
        .Multiple((bool) ViewData["multiple"])
        .Async(async => async
            .Save("Save", "Upload")
            .Remove("Remove", "Upload")
            .AutoUpload((bool) ViewData["autoUpload"])
        )
    )

Thanks,
Subbu.

2 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 31 May 2013, 06:52 AM
Hi Subramanian,


The provided code sample seems correct. Please make sure that are not any JavaScript errors in the console and that all requests are successful in the "Network" tab of the developer tools. You could take a look at the following page about Migrating to Kendo UI.

For your convenience I prepared the following sample solution with the same implementation (I did not include the controller for the Upload for simplicity). Please let me know if it covers the current scenario?

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Subramanian
Top achievements
Rank 1
answered on 31 May 2013, 12:32 PM
Thank you, I found the issue in javascript bundling with "modernizr" after the migration to KendoUI.

Thanks,
Subbu.
Tags
Window
Asked by
Subramanian
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Subramanian
Top achievements
Rank 1
Share this question
or