[Bug Report] DataBound event not firing for kendoMobileListView

6 posts, 1 answers
  1. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 23 Jun 2013 Link to this post

    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.
  2. Answer
    Kristian D. Dimitrov
    Admin
    Kristian D. Dimitrov avatar
    68 posts

    Posted 26 Jun 2013 Link to this post

    Hello Donald,

     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.

    Regards,
    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.
  3. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 26 Jun 2013 Link to this post

    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.
  4. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 29 Jun 2013 Link to this post

    Hello Donald,

    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!
  5. Jack
    Jack avatar
    100 posts
    Member since:
    Jan 2007

    Posted 03 Jun Link to this post

    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.... 

  6. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 08 Jun Link to this post

    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
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top