I have a ListView in a Mobile View that wires to an ASMX datasource. Works great and shows me a nice loading message while the data is retrieved.
I then Added a main view with a menu of options, and moved the init of the ListView to the data-show event on the Mobile View it was moved to. Now I do not get a Loading message while the data is retrieved for my ListView
Is this normal behavior?
I may have broken something, because the ListView no longer scrolls and the PullToRefresh doesn't work (in Chrome) when fired this way
I then Added a main view with a menu of options, and moved the init of the ListView to the data-show event on the Mobile View it was moved to. Now I do not get a Loading message while the data is retrieved for my ListView
Is this normal behavior?
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Default.Master"
CodeBehind="default.aspx.vb" Inherits="Mobile._default1" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"head"
runat
=
"server"
>
</
asp:Content
>
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
runat
=
"server"
>
<
div
data-role
=
"view"
data-title
=
"Mobile Home"
id
=
"home"
data-transition
=
"slide"
>
<
header
data-role
=
"header"
>
<
div
data-role
=
"navbar"
>
<
span
data-role
=
"view-title"
></
span
>
</
div
>
</
header
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
>
<
li
><
a
href
=
"#myDatabase"
>My Database</
a
></
li
>
<
li
><
a
>My Favorites</
a
></
li
>
<
li
><
a
>My To-Do's</
a
></
li
>
<
li
><
a
>My Proposals</
a
></
li
>
<
li
><
a
>My Alerts</
a
></
li
>
</
ul
>
</
div
>
<
div
data-role
=
"view"
data-transition
=
"overlay"
data-title
=
"My Database"
id
=
"myDatabase"
data-show
=
"getMyDatabase"
data-layout
=
"mobile-view"
>
<
ul
id
=
"myDatabaseList"
data-style
=
"inset"
data-role
=
"listview"
>
</
ul
>
</
div
>
<
div
data-role
=
"layout"
data-id
=
"mobile-view"
>
<
header
data-role
=
"header"
>
<
div
data-role
=
"navbar"
>
<
a
class
=
"nav-button"
data-align
=
"left"
data-role
=
"backbutton"
>Back</
a
> <
span
data-role
=
"view-title"
>
</
span
><
a
data-align
=
"right"
data-role
=
"button"
class
=
"nav-button"
href
=
"#home"
>Home</
a
>
</
div
>
</
header
>
<
footer
data-role
=
"footer"
>
<
div
data-role
=
"tabstrip"
>
<
a
data-icon
=
"contacts"
>My Database</
a
> <
a
data-icon
=
"recents"
>To-Do</
a
> <
a
data-icon
=
"bookmarks"
>
Proposals</
a
> <
a
data-icon
=
"about"
>Alerts</
a
>
</
div
>
</
footer
>
</
div
>
<
script
id
=
"myDatabaseTemplate"
type
=
"text/x-kendo-template"
>
<
div
style
=
"font-weight:bold;font-size:22px"
>#= Name #</
div
>
<
div
style
=
"font-weight:normal;font-size:15px"
>(ID: #= ID #)</
div
>
</
script
>
<
script
type
=
"text/javascript"
>
var app = new kendo.mobile.Application();
/////// Handle My Database View
function getMyDatabase() {
$("#myDatabaseList").kendoMobileListView({
dataSource: dataSourceMyDatabase,
template: $("#myDatabaseTemplate").text(),
pullToRefresh: true
});
}
var dataSourceMyDatabase = new kendo.data.DataSource({
transport: {
read: {
contentType: "application/json; charset=utf-8",
dataType: "json",
data: { UserID: "JS" }
},
//data: { UserID: "JS" },
parameterMap: function (options) {
return kendo.stringify(options); // kendo.stringify serializes to JSON string
}
},
schema: {
data: "d.MyDatabase"
}
});
///////
</
script
>
</
asp:Content
>
I may have broken something, because the ListView no longer scrolls and the PullToRefresh doesn't work (in Chrome) when fired this way