Programatically creating listview removes page background

4 posts, 0 answers
  1. Glen
    Glen avatar
    2 posts
    Member since:
    Jul 2012

    Posted 09 Jul 2012 Link to this post

    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!
  2. Francois Lorrain
    Francois Lorrain avatar
    7 posts
    Member since:
    Apr 2010

    Posted 15 Aug 2012 Link to this post

    I have the same problem, any suggestion?

    Thanks in advance!
  3. Kendo UI is VS 2017 Ready
  4. Glen
    Glen avatar
    2 posts
    Member since:
    Jul 2012

    Posted 15 Aug 2012 Link to this post

    I added class="km-insetcontent" to the view and it fixed it.
  5. Francois Lorrain
    Francois Lorrain avatar
    7 posts
    Member since:
    Apr 2010

    Posted 15 Aug 2012 Link to this post

     It work fine.

    Thank you very much! 
Back to Top
Kendo UI is VS 2017 Ready