Toggle listview item background color on item click

2 posts, 0 answers
  1. user1843640
    user1843640 avatar
    8 posts
    Member since:
    Oct 2006

    Posted 11 Dec 2012 Link to this post

    Given a viewmodel which contains an array of objects that have a boolean property (Selected), how should I set the background color of the ListView items dynamically.  I have tried to use the style binding which works fine when the ListView first loads but the ListView is not updated as the items "Selected" property change (on click).

    Here is the fiddle.
  2. Petyo
    Petyo avatar
    2444 posts

    Posted 12 Dec 2012 Link to this post


    You have to use the get and set MVVM methods in order to modify an object state. 

    All the best,
    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