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

Clickable listview

3 Answers 401 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
OfficeHeart
Top achievements
Rank 1
OfficeHeart asked on 25 Jan 2012, 01:44 PM
Hi,

Great work for KendoUI mobile developers!

How can I make the items in a listview clickable (as shown in the Basic usage) example?
I use the databinding method.

My goal: when a user clicks on an item, slide in a remote view.

Thanks,
Koen

3 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 25 Jan 2012, 02:58 PM
Hi Martin,

Thanks for the kind words! Up to your question, this can be achieved by customizing the ListView item template when in databound mode. 

We do the same thing in our sushi demo - you can check it out and examine its source.  

Kind regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Thomas
Top achievements
Rank 1
answered on 11 Feb 2012, 06:36 PM
And how can I bind a Click-Event without the templating option?

This code does not work:

<ul>
    <li data-icon="recents"><a class="details-link" href="http://kendoui.hierbinichgast.de/Termin.aspx?termin=All%20you%20can%20eat" data-role="listview-link"><span>All you can eat</span></a></li>
     <li data-icon="recents"><a>Cocktail-Abend</a></li>
     <li data-icon="recents"><a>Happy Midnight</a></li>
 </ul>

The first link will look different (no icon will be displayed), no clicked-color occurs and only the text is linked, not the complete bar.
0
Kamen Bundev
Telerik team
answered on 13 Feb 2012, 02:19 PM
Hello Thomas,

If you remove the data-role attribute from the link, it will render properly.

If you want to use remote views in your listview, check the Application example in Kendo UI Mobile demos - both views are loaded from external URLs (though in the same domain).

Greetings,
Kamen Bundev
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
OfficeHeart
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Thomas
Top achievements
Rank 1
Kamen Bundev
Telerik team
Share this question
or