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

Programatically creating listview removes page background

3 Answers 42 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Glen
Top achievements
Rank 1
Glen asked on 10 Jul 2012, 02:30 AM
I am using the ios theme in a phonegap application.  Everything is working great, except on one page when I programatically create a listview from a datasource, the vertical stripped background goes white.  

It happens when the photoList listview is created by calling the following:

$("#photoList").kendoMobileListView({
    dataSource: photoDataSource,
    template: kendo.template($("#photoListTemplate").html())
 });

<script type="text/x-kendo-tmpl" id="photoListTemplate">
<a onclick="editPicture('${data.photo_id}');">
<img class="item-photo" src="${data.imageURI}">
<h3 class="item-title">${data.title}</h3>
<p class="item-info">(Click to edit)</p>
</a>
<a data-role="button" class="delete-link" onclick="removePicture('${data.photo_id}');">Remove</a>
</script> 

<ul data-role="listview" data-style="inset" data-type="group">
<li>Property
<ul>
<li style="text-align:center;"><h4 id="propertyInfoDisplay"></h4></li>
<li style="text-align:center;">
<a onclick="showCameraOptions();" data-role="button">Photo</a>
<a onclick="uploadThisPropertyPhotos();" data-role="button">Upload</a>
<a onclick="showMap();" data-role="button">Map</a>
</li>
</ul>
</li>
<li>Photos for upload
<ul id="photoList"></ul>
</li>
</ul>

Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Francois Lorrain
Top achievements
Rank 1
answered on 15 Aug 2012, 07:58 PM
I have the same problem, any suggestion?

Thanks in advance!
0
Glen
Top achievements
Rank 1
answered on 15 Aug 2012, 08:09 PM
I added class="km-insetcontent" to the view and it fixed it.
0
Francois Lorrain
Top achievements
Rank 1
answered on 15 Aug 2012, 08:21 PM
 It work fine.

Thank you very much! 
Tags
ListView
Asked by
Glen
Top achievements
Rank 1
Answers by
Francois Lorrain
Top achievements
Rank 1
Glen
Top achievements
Rank 1
Share this question
or