How to highlight selected list Item in ListView for mobile

4 posts, 0 answers
  1. Vinodh K
    Vinodh K  avatar
    8 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    Hi All,

    Please find the attachment for details.


    Thanks & Regards,
    Vinodh Kumar
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 27 Feb 2013 Link to this post

    Hi Vinodh,

    To achieve that, please hook up to the click event of the widget. In the event handler you can toggle a class that indicates the selected state.
    function onClick(e) {
        e.item.toggleClass("listview-selected");
    }

    For your convenience I prepared a small example: http://jsbin.com/igolev/52/edit
    I hope this will help.

    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!
  3. Hemant
    Hemant avatar
    1 posts
    Member since:
    Jul 2012

    Posted 24 Jul 2014 in reply to Alexander Valchev Link to this post

    Just want share this quick solution for removing class from already selected item. Here's a update jsbin link:

    http://jsbin.com/igolev/127/edit
  4. perico
    perico avatar
    28 posts
    Member since:
    Dec 2006

    Posted 27 Jun 2017 in reply to Hemant Link to this post

    Thank you very helpful !
Back to Top