This question is locked. New answers and comments are not allowed.
I'm able to get the sqlite data to display on Icenium console window but not ListView. Here is my code:
var dbresult;
function queryDB(tx) {
tx.executeSql('SELECT * FROM DemoTable', [], querySuccess, onError);
}
function querySuccess(tx, results) {
dbresult = results;
var len = results.rows.length;
console.log("DEMO table: " + len + " rows found.");
$("#displayResult").empty();
for (var i = 0; i < len; i++) {
console.log("ID = " + results.rows.item(i).id + "Data = " + results.rows.item(i).data);
}
$("#myListView").kendoMobileListView({
dataSource: kendo.data.DataSource.read({data: results.rows.item().id, group: "id"}),
template: $("#myTemplate").html(),
fixedHeaders: true
});
}
In index.html
<
div
id
=
"myListView"
></
div
>
<!--Template-->
<
script
type
=
"text/x-kendo-template"
id
=
"myTemplate"
>
<
h3
>${id}</
h3
>
<
p
>${data}</
p
>
</
script
>
I think that is something wrong about my dataSource but don't know how?
can any1 help?
thanks.