Clickable listview

4 posts, 1 answers
  1. OfficeHeart
    OfficeHeart avatar
    99 posts
    Member since:
    Aug 2008

    Posted 25 Jan 2012 Link to this post

    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
  2. Answer
    Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 25 Jan 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Thomas
    Thomas avatar
    21 posts
    Member since:
    Oct 2011

    Posted 11 Feb 2012 Link to this post

    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.
  5. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 13 Feb 2012 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready