How to select first item in ListView and update the GUI

4 posts, 0 answers
  1. Morten
    Morten avatar
    267 posts
    Member since:
    Jul 2012

    Posted 19 May 2015 Link to this post

    I would like to initially select the first item in a listview bound to a viewModel:

    http://jsbin.com/xawemuwonu/2/

    The change event fires on page load, however, how do I have the list view updated as if I had manually selected the item?

  2. Morten
    Morten avatar
    267 posts
    Member since:
    Jul 2012

    Posted 19 May 2015 in reply to Morten Link to this post

    http://jsbin.com/xawemuwonu/2/edit?html,output
  3. Kendo UI is VS 2017 Ready
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 21 May 2015 Link to this post

    Hello Morten,

    You should select the item after the data is bound, e.g. at the dataBound event.
    Check the updated example: http://jsbin.com/sofesasari/1/edit

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Morten
    Morten avatar
    267 posts
    Member since:
    Jul 2012

    Posted 21 May 2015 in reply to Alexander Valchev Link to this post

    Hi Alexander,

    thanks a lot. That worked.

    /Morten

Back to Top
Kendo UI is VS 2017 Ready