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

Detail view of item on list view

1 Answer 169 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Chuck
Top achievements
Rank 1
Chuck asked on 06 Mar 2012, 09:07 PM
I've got a very simple listview and I want to click on one of the items to be able to view a detail page of the item.  I've tried following the example in the Sushi and I've got the following code

<div class="back-button-show" data-role="view" data-layout="app" data-show="getVendorDetails" data-title="" id="vendor-details">
</div>
 
<script type="text/x-kendo-template" id="vendors-all-list">
        <a class="vendor-details-link" data-role="listview-link" href="\#vendor-details?id=${id}">
            <div class="vendor-list-booth">${ booth_number }</div>
            ${ name }<br />
            <span class="vendor-list-taglag">${ tag_line }</span><br />
        </a>
 </script>
       
 <script type="text/x-kendo-template" id="vendor-details-template">
        ${ name }
 </script>
 
<script>
...
  var getVendorDetails = function(e) {
            var view = e.view;
             
            vendor = vendorAlphaDS.get(view.params.id);
            view.content.data("kendoMobileScroller").scrollElement.html(vendorDetailTemplate(vendor));
            kendo.view.enhance(view.content);
        };
</script>

I'm running this in a phonegap project under XCode.  The problem is when I run the project in the simulator, the system won't click on the detail page.  If I comment out the kendo.view.enhance, then I can click to the detail page but nothing happens (it's just a blank page).  Any help would be greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 07 Mar 2012, 09:00 AM
Hi Charles,

The (undocumented yet) method you are probably looking for is kendo.mobile.enhance. Its purpose is to initialize the mobile widgets in a given DOM element. We are going to provide further documentation for the final release. 

However, I am not sure if this will solve your problem, as some parts of your code are missing (the data source, the template function, etc.) 

Is it possible for you to provide a link to the project, where this issue is reproducible? 

All the best,
Petyo
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
Chuck
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or