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

Show spinner on listview data refresh

1 Answer 335 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 19 Feb 2013, 10:33 PM
I am creating a Listview control in markup, and on a button click event am initializing and loading data into a datasource for display as result of a user initiated search.  When the user performs a new search, I call the datasource.reload() to retrieve data for the updated search criteria.  The spinner doesn't show up when I do so.  What can I do to get the spinner to show during the reload operation?  Here is the code that handles the 'click' event of the search.  Everything works fine except there is no spinner during read()
//Handle the search 'GO' button click event
this.doItemSearch =
function () {
//this selector grabs the search criteria
    if ($('#searchCriteria').val() != '') {
        if (dataSource)
            dataSource.read();
        else
            initdataSource();
         
        if (listView) {
            //Do nothing
        }
        else {
            listView = $("#myListView").kendoMobileListView({
                dataSource: dataSource,
                template: $("#myTemplate").text(),
                endlessScroll: true,
                scrollTreshold: 30 //treshold in pixels
            });
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 21 Feb 2013, 11:47 AM
Hello Scott,

Please use the show/hideLoading methods of the mobile application. You can show the loading pop-up right before re-reading the dataSource and hide it at the requestEnd event.
Fore information please see the following demo:

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
Scott
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or