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

    Posted 12 Dec 2012 Link to this post

    Hello,

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

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