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

Issue using pullToRefresh in Desktop site

3 Answers 62 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 07 Jul 2015, 10:00 AM

I have a site where I am mixing mobile and desktop widgets, in some cases I show a mobile widget if viewed on a mobile device.  I am trying to use the mobileListView with the below code.

 

01.<script id="tmp" type="text/x-kendo-template">
02. 
03.    <p>#: name # <span>Age: #: age #</span></p>
04.</script>
05.<script>
06. 
07. var dataSource = new kendo.data.DataSource({
08.        data: [
09.            { name: "Jane Doe", age: 30 },
10.            { name: "John Doe", age: 33 }
11.        ]
12.    });
13. 
14.    $("#lv-detail").kendoMobileListView({
15.        dataSource: dataSource,
16.        pullToRefresh: true,
17.        template: kendo.template($("#tmp").html())
18.    });
19.</script>

 I get an error stating Cannot read property 'setOptions' of undefined.  I have followed the instructions here on using mobile widgets with desktop:

http://docs.telerik.com/kendo-ui/mobile/regular-usage

I have version v2015.2.624 of the components.

 You can see the issue here:

http://dojo.telerik.com/oQAtO

 

If you remove the pullToRefresh attribute the list view renders

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 08 Jul 2015, 07:09 AM

Hello John,

in order to use pull to refresh, you will need a mobile scroller - something like this.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
John
Top achievements
Rank 1
answered on 10 Jul 2015, 09:11 AM

Thanks, I'm getting further now.  The behaviour is still not as  I expect.  When I add pullToRefresh and EndlessScrolling with a page size of 5 it doesn't seem to work correctly at all. It only ever shows 2 items.

 see http://dojo.telerik.com/UYiRO

0
Petyo
Telerik team
answered on 12 Jul 2015, 03:57 PM
Hi,

the behavior you refer to is by design and documented here. You should use larger page size. Please look through the linked article, as there are several specifics of the endless scrolling mode. 

Regards,
Petyo
Telerik
 
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
John
Top achievements
Rank 1
Answers by
Petyo
Telerik team
John
Top achievements
Rank 1
Share this question
or