This is a migrated thread and some comments may be shown as answers.

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

3 Answers 125 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 23 Jun 2012, 10:33 PM
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. 

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 28 Jun 2012, 07:07 AM
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!
0
Matt
Top achievements
Rank 1
answered on 13 Jul 2012, 08:22 PM
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. 
0
Alexander Valchev
Telerik team
answered on 16 Jul 2012, 03:49 PM
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!
Tags
ListView (Mobile)
Asked by
Matt
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Matt
Top achievements
Rank 1
Share this question
or