This question is locked. New answers and comments are not allowed.
It appears as though the DataBound event does not fire each time "the ListView has received data from the data source" as specified in the docs (http://docs.kendoui.com/api/mobile/listview#events-dataBinding). It fires once, when the ListView gets its initial data, but not after that.
Please see the Icenium project "KendoMobileListViewDataBound" that is tied to my account for a working example of this. Just run it, have your console open, and click the button. You'll see that console.log() is not firing each time new data is added.
Please see the Icenium project "KendoMobileListViewDataBound" that is tied to my account for a working example of this. Just run it, have your console open, and click the button. You'll see that console.log() is not firing each time new data is added.
5 Answers, 1 is accepted
0
Accepted
Hello Donald,
Kristian D. Dimitrov
Telerik
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
By design the DataBound event of the Kendo Mobile UI ListView is fired only on first load.
To achieve the behavior you want, you can use the change event of the DataSource.
Kristian D. Dimitrov
Telerik
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
Don
Top achievements
Rank 1
answered on 26 Jun 2013, 02:16 PM
Thanks for that reply. It is very confusing because Kendo UI Web ListView behaves in the way I described - its DataBound event fires every time data is changed. Same widget name (i.e. ListView) same event name (i.e DataBound) but different behaviors. Might I suggest clarifying that difference in the docs. Right now, the docs for Mobile ListView says DataBound fires when "the ListView has received data from the data source". That's a bit ambiguous.
0
Hello Donald,
Petyo
Telerik
Thank you for your feedback. I agree with you - the current event lifecycle is inconsistent and confusing. We will do our best to address that for our next release.
Regards,Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jack
Top achievements
Rank 2
Iron
answered on 03 Jun 2016, 09:07 AM
3 years later and the issue is still pending.
I am attempting to prevent a flicker effect when changing the dataSource by showing/hiding the loader but the dataSource change event occurs too soon to prevent that. dataBound on the kendo.mobile.ui.LisView would have been the proper event if only it worked as expected....
0
Hi all,
Let me provide some background information about the current implementation of the MobileListView events.
- dataBinding and dataBound are fired only when virtualization (endless scrolling) is disabled
- itemChange is fired only when virtualization is enabled
The reasoning behind this approach is the following:
- dataBinding and dataBound are normally associated with refreshing of all rendered items of a Kendo UI widget. Such a refresh does not occur in virtualized mode, when only some items are removed from one end and appended at the other end, while scrolling. The Kendo UI Angular integration relies on widgets' dataBound events to recompile the item templates, and if the dataBound event is fired in virtual mode, this will recompile templates that have already been compiled, which is not necessary.
- dataBound assumes that all widget items are freshly rendered, so customizations may be required by all of them. On the other hand, itemChange is fired for specific items.
Since the itemChange can be fired multiple times in virtual mode, it is possible to use event throttling to hide a loading indicator.
Regards,
Dimo
Telerik
Let me provide some background information about the current implementation of the MobileListView events.
- dataBinding and dataBound are fired only when virtualization (endless scrolling) is disabled
- itemChange is fired only when virtualization is enabled
The reasoning behind this approach is the following:
- dataBinding and dataBound are normally associated with refreshing of all rendered items of a Kendo UI widget. Such a refresh does not occur in virtualized mode, when only some items are removed from one end and appended at the other end, while scrolling. The Kendo UI Angular integration relies on widgets' dataBound events to recompile the item templates, and if the dataBound event is fired in virtual mode, this will recompile templates that have already been compiled, which is not necessary.
- dataBound assumes that all widget items are freshly rendered, so customizations may be required by all of them. On the other hand, itemChange is fired for specific items.
Since the itemChange can be fired multiple times in virtual mode, it is possible to use event throttling to hide a loading indicator.
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!