Kendo window with partial view displays blank window in tablet/phone

5 posts, 0 answers
  1. Anamika
    Anamika avatar
    124 posts
    Member since:
    Mar 2014

    Posted 06 Aug 2014 Link to this post

    Hello,

    I am using Kendo window to Display a partial view. Works fine and Displays good in Desktop Version , but when i run on tablet or phone the window Comes up with nothing inside. But debug Shows it did load partial view file. What could be the Problem any idea?

    in view which invokes Kendo window i have
    @(Html.Kendo().Window()
    .Name("mobilewindow")
    .Width(630)
    .Height(400)
    .Draggable()
    .Resizable()
    .Actions(actions => actions.Refresh().Close())
    .Title("Objekt Auswahl Tablet")
    .Visible(false)
    .LoadContentFrom("AddObject", "Objekt")

    )
    On button click i load partial view
    function TestClick(e) {

    var direction = "Objekt/AddObject";
    var selObject = $('input[name="txtObjectID"]').val();
    var wnd = $("\\#mobilewindow").data("kendoWindow");
    if (wnd) {
    wnd.refresh({
    url: direction,
    data: { strObjectID: selObject }

    });
    wnd.center();
    wnd.open();
    }
    };
    public ActionResult AddObject(string strObjectID)
    {
    return PartialView("_SelectObject");

    }

    Anamika
  2. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 08 Aug 2014 Link to this post

    Hello Anamika,

    Apart from the backslashes in the Window jQuery selector (maybe the code is inside a Kendo UI template?), I don't see anything problematic in the provided snippet and it works correctly on my side in mobile devices. Feel free to provide a runnable example for further testing.

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Anamika
    Anamika avatar
    124 posts
    Member since:
    Mar 2014

    Posted 11 Aug 2014 in reply to Dimo Link to this post

    Hello,

    please find the attached sample. Because of size constraints i have not included content, app_data or scripts folder. please run the app on desktop and when you double click event on scheduler in custom editortemplate you see a button by objectID and clicking on the button displays partial view in popup window. Nowrun same on tablet and tap an event and then in template when click button by objectID the pop up window loads but blank

    Thnaks

    Anamika
  5. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 12 Aug 2014 Link to this post

    Hello Anamika,

    The provided project was not runnable due to a lot of missing references and files, but I saw the cause of the problem. It is caused by the fact that the Window inside the editor template is initialized inside a hidden container. As a result, its content wrapper receives a visibility:hidden style that you need to remove manually:

    if (wnd) {
        wnd.element.css("visibility", "");
        // ...
    }

    We came across this issue recently and will resolve it in future Kendo UI builds.

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Anamika
    Anamika avatar
    124 posts
    Member since:
    Mar 2014

    Posted 13 Aug 2014 in reply to Dimo Link to this post

    Thanks Dimo, That worked like a charm. Not sure why on Desktop Version it works fine and only for mobile devices we have to set visibility. But it works fine now.

    Anamika
Back to Top
Kendo UI is VS 2017 Ready