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

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

4 Answers 290 Views
Window
This is a migrated thread and some comments may be shown as answers.
Anamika
Top achievements
Rank 1
Anamika asked on 06 Aug 2014, 07:43 AM
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

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Aug 2014, 08:30 AM
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!
 
0
Anamika
Top achievements
Rank 1
answered on 11 Aug 2014, 07:50 AM
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
0
Dimo
Telerik team
answered on 12 Aug 2014, 04:17 PM
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!
 
0
Anamika
Top achievements
Rank 1
answered on 13 Aug 2014, 06:41 AM
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
Tags
Window
Asked by
Anamika
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Anamika
Top achievements
Rank 1
Share this question
or