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

Binding swipe events on data bound mobile listview

1 Answer 148 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 21 Jul 2012, 02:00 PM
I have a mobile listview bound to a model array.
I would like to bind the swipe events on the list view items to display a delete button (the iOS way).
I have implemented the swipe events as explained at http://demos.kendoui.com/mobile/swipe/index.html.
Unfortunately I cannot specify the function that binds the events in the data-init attribute of the view because my listview is dynamic.
1) Which event shall I use (change event on the model? how can I be sure that it is called after the listview is updated?)
2) How to unbind the handlers before binding them again?

Optionally:
3) Is there any way to make the items in the list view draggable to be reordered?

1 Answer, 1 is accepted

Sort by
0
Jack
Top achievements
Rank 1
answered on 21 Jul 2012, 04:06 PM
I have been able to achieve (not optimally) the desired functionality with the dataBound event on the listview but if the dataSource has n rows and row n+1 is added to the underlying model, the event is triggered n+1 times when the listview reloads the datasource. So this makes it all the more necessary to unbind swipe events if this is the the route to take.
Tags
ListView (Mobile)
Asked by
Jack
Top achievements
Rank 1
Answers by
Jack
Top achievements
Rank 1
Share this question
or