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

Refresh page after AJAX request

2 Answers 199 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James Lamar
Top achievements
Rank 1
James Lamar asked on 26 Jan 2012, 08:15 PM
I am dynamically loading the HTML of the page through AJAX and I need to refresh the KendoUI Mobile styling after the HTML is loaded into the DOM. I can do this with jQueryMobile by calling:

complete: function(xhr, textStatus) {
$("#page").trigger("create");
}

Is there a similar function for Kendo?

2 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 27 Jan 2012, 08:44 AM
Hello,

I am not sure I understand your case completely. Are you loading HTML with mobile widgets in it? If this is the case, you can use

kendo.mobile.enhance($("#page"));

Disclaimer: this method is internal for KendoUI Mobile. Its behavior may change in future versions. 

Kind regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
James Lamar
Top achievements
Rank 1
answered on 27 Jan 2012, 04:31 PM
I was actually referring to refreshing the entire view, but I think what you provided will help once I start loading widgets in the HTML. In order to refresh the entire view I called "window.kendoMobileApplication = new kendo.mobile.Application(document.body);" on completion of loading the HTML. "kendo.mobile.enhance" only refreshed the elements in the view, but I ultimately got what I needed.

Thanks for the help!
Tags
General Discussions
Asked by
James Lamar
Top achievements
Rank 1
Answers by
Petyo
Telerik team
James Lamar
Top achievements
Rank 1
Share this question
or