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

Empty data shown on remote view after second click

2 Answers 114 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
CH
Top achievements
Rank 1
CH asked on 01 Feb 2013, 07:59 AM
Hi, i have encounter a weird scenario where my list view suppose to shows a detail information of my project.

Here is my scenario:
I have a list view to shows all my product, when i touch\click on the first list view, it will show my remote view(passing in querystring) on the product details.

I then go back to the first view where it shows all my product, i then select the second product, when i am at my remote view, it is empty. 

Weird thing is that the second time i tried, it did call my server script to grab the second product information, but it didnt show the data.

I think it could be some caching issue where remote view is cache. can i uncache it?

regards,
CH



2 Answers, 1 is accepted

Sort by
0
CH
Top achievements
Rank 1
answered on 04 Feb 2013, 06:54 AM
Hi,
Seem like each time when I tab\touch on the item which load my remote data, it will cache it. I manage to delete the data based on data-show event. I am not sure if this is a best practice?

Below is my code for those who are having the same scenarios as me:
HTML:
<div data-role="view" data-title="Views" id="overview-list" data-init="ProjectList" data-layout="overview-layout" data-show="DeleteCacheProjectList" >
 
 
  <ul data-role="listview" data-style="inset" data-type="group"  >
        <li>
            <ul id="endless-scrolling" >
       
            </ul>
                <span class="km-load-more">
                  <a class="km-load km-button" data-role="button" data-click="GetProjectListPaging">Load More</a>
          </span>
        </li>
    </ul>
 
   
 <script id="endless-scrolling-template" type="text/x-kendo-template">
 <a href="/_layouts/CKS.EBE.Mobile/pages/projectDetail.aspx?id=#=ID #" data-transition="slide"" class='km-listview-link' data-role='listview-link'>
    <div class="Lists">
        <img class="pullImage" src="#=Picture1 #" />#= Title #
        <div class="metadata">
        #= Description #
        </div>
     </div>
   </a>
</script>
</div>
<script>
    function DeleteCacheProjectList() {
           $("#remoteview").remove();
    }
</script>
Thanks.

Regards,
CH
0
Alexander Valchev
Telerik team
answered on 04 Feb 2013, 04:05 PM
Hello,

I noticed that you opened a support ticket on the same subject. According to the information provided in the ticket, you were able to find a solution.

In order to avoid further duplication I kindly ask you to submit your questions only once - either in the forums or via support ticket. We monitor both communication channels.
Thank you in advance.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
CH
Top achievements
Rank 1
Answers by
CH
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or