Programatically refresh DataSource bound ListView

2 posts, 0 answers
  1. Matt
    Matt avatar
    6 posts
    Member since:
    Jul 2012

    Posted 17 Sep 2012 Link to this post

    Hi,

    I'm using the mobile UI and I have a listView set up to a JSONP URL for the dataSource.

    This works great, I can pull to refresh, etc.

    However, I want to find a way to alter the URL on a subsequent call and refresh/reload the data via JSONP. Is this possible at all?

    For example, I have a data-init="loadList"

    function loadList () { ... } # this sets up the kendo.data.Datasource and adds to kendoMobileListView({ ... });

    If I call loadList again, it correctly refreshes the display by pulling the data over Ajax but it adds two "Press to load more" buttons at the footer and another "Pull to refresh" widget at the top. It seems to be adding rather than replacing.

    Does this make sense? I basically need to alter the dataSource URL and pull again from the server programatically after a user action.
  2. Matt
    Matt avatar
    6 posts
    Member since:
    Jul 2012

    Posted 17 Sep 2012 Link to this post

    I found a hackish solution here: 

    http://www.kendoui.com/forums/mobile/listview/mobile-listview-is-not-refreshing-on-button-click.aspx#2293475

    Something better/native appreciated!
  3. Kendo UI is VS 2017 Ready
Back to Top