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

Programatically refresh DataSource bound ListView

1 Answer 511 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 17 Sep 2012, 06:47 PM
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.

1 Answer, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 17 Sep 2012, 07:05 PM
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!
Tags
ListView (Mobile)
Asked by
Matt
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Share this question
or