ListView elements losing select style, and listview.refresh() does not gain it back.

4 posts, 0 answers
  1. Matt
    Matt avatar
    2 posts
    Member since:
    Jun 2012

    Posted 23 Jun 2012 Link to this post

    I have a Mobile ListView which I am adding to dynamically. If the user adds 1 - 2 elements to it and then clicks on them they are highlighted blue as a selection indicator. If the user adds more to the list than 1 - 2 this selection goes away. 

    Every time a user adds/removes an element from the list this code is run:
    listView = $('#favorites-list').data('kendoListView')
    listView.refresh()

    I would expect this to renew the highlighting selection indicator, but it does not. 

    What am I doing wrong here? Thanks!

    Edit 1: Oh by the way, I am using coffee script so that is all legal. 
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 28 Jun 2012 Link to this post

    Hi Matt,

    I am afraid that your question is a bit unclear. Could you please specify how do you make the selection and how the user adds more records to the list view?
    By default when you insert a record through the dataSource API, the list view bound to it will refresh automatically and new item will be displayed. I have tried a similar scenario in this fiddle and did not managed to reproduce the behaviour that you described. Could you edit my example and point out what I am missing? Thus way I would be able to examine your case and advice you further.

    Kind 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. Kendo UI is VS 2017 Ready
  4. Matt
    Matt avatar
    2 posts
    Member since:
    Jun 2012

    Posted 13 Jul 2012 Link to this post

    I should have mentioned that I am not using the DataSource API. I started this project without kendo and I am using Backbone JS. Does this clarify the problem? Do you have any suggestions regarding this? I am about to say screw it and just adding the list element style statically in the template that generates the links. How horrible of an idea is that? 

    Thanks. 
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 16 Jul 2012 Link to this post

    Hello Matt,

    I cannot say what is going wrong on the basis of the provided information. It seems that you are not using the standard Kendo methods, so it would be best if you could submit a support ticket with a small but runnable project attached. Thus way we would be able to reproduce the issue locally, investigate your case in details and if the problem is related to our framework - to advise you further.

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