Telerik Forums
Kendo UI for jQuery Forum
1 answer
19 views

I can't seem to see a way to wait x milliseconds before updating the data if I have filterable: true on my kendoMobileListView.

 As it is right now, every time the user types a character, it immediately fetches the next set of data.  Unacceptable on mobile devices where data usage is a concern.

How can I wait until no keypresses have occured for 1000ms before implementing the refresh?

Alexander Valchev
Telerik team
 answered on 09 Oct 2015
6 answers
128 views

I have an app that has several listviews tied to remote data sources.  I have tied three buttons on the main form to each display a different listview and allow the user to select an item on the list, which is populated on the main form.  All three Listviews have the same code as listed below. They display the code for the selected item in a field on the form.  That doesn't seem to matter.  The code blow includes a section to check if there is no data item selected.  This is where the problem lies.

        $(document).ready(function () {
            $("#proclist").kendoListView({

                 change: function () {
                    var item = this.dataItem(".k-state-selected");
                    if (item === undefined) {
                        alert("nothing selected");
                        return;
                    }
                    window.encounterView.setProcCode(this.dataItem(".k-state-selected").code);

        }

}

When you select something on the listview the change code is fired.  The third time you open a different listview and click on an item, item is always returned as undefined.

It doesn't matter what order you click on the buttons, it always fails on the third time.  Is this a bug or just a limitation of the simulation environment?

 Also 2 of these lists have almost 9000 items in them.  I've tried limiting them to 500 items  but that fails in the same way.  Is there a limitation I should be aware of?

 

Doug
Top achievements
Rank 1
 answered on 02 Oct 2015
3 answers
55 views

Hi,

I saw several discussions targeting other Kendo controls, but I did not see this particular question for the mobile listview. It is quite simple; I use the JayData "asKendoDataSource" function to get data from the local db and hook it up to a mobile listview. A simple template is showing the fields in format:

<td> #=CustomerCode#</td>

I know i can modify the values displayed by using a generic js function within the template like this:

<td>#= CheckNull(CustomerDesc)#</td>

But this means I need to embed this CheckNull in all of my templates (since I use deep model nesting it will get pretty ugly). Is there really no ​other elegant way? Seems ​quite a no brainer that 'null' values ​should not be displayed. ​I understood this behavior is already fixed for the Kendo grid; just wondering if it is possible for the listview as well.

Best regards,

Ruud

 

Kiril Nikolov
Telerik team
 answered on 02 Oct 2015
3 answers
82 views

Hi,

I'm using the Mobile ListView Widget in combination with AngularJS and a binding to an observable array. Each time when I update an entry in the observable array via the "set" function (triggered by a button), it seems that a new $scope is created (see attached screenshot from AngularJS Batarang Plugin for Chrome) and never deleted again and this leads also to more and more memory consumption (this is the actual problem for my application).This behavior does not occur with other widgets (e.g. Grid).

I have created a small sample with which this behavior can be reproduced which basically is the same example as in http://docs.telerik.com/kendo-ui/AngularJS/data-source (example on the bottom), but with the additional line:

 <kendo-mobile-list-view k-data-source="gridData"></kendo-mobile-list-view>

 http://dojo.telerik.com/@tobias006/EGUKI/4

(When directly running in the dojo I could not see the same output in the AngularJS scope view from the Batarang plugin, so maybe it has to be run locally)

 Without this line, everything seems to be ok, but when using the Mobile ListView widget with k-data-source the memory problem occurs. Is there a way to prevent this? 

Thanks for any hints,

Regards,

Th

Petyo
Telerik team
 answered on 09 Sep 2015
16 answers
171 views
We have received a bug report from a user with our app, and we believe we have an idea where the cause might be.

Our App does a local-datasource set when the user edits a record, it then calls an API on our server and if the results from this API is OK, we perform a datasource sync. 

Sometimes (it is not consistent) - the list-view scrolling gets stuck on an iPhone (we were unable to reproduce in Chrome, did not test it on Android) following one or more of these edit operations.

We managed to recreate the issue with a small sample (remember, you need to test it from a device, it does not happen in Chrome).

http://dojo.telerik.com/aReBU/10

We tried to simulate our app by doing the following:

When we edit, we do a set on the record, wait a random amount of time (to simulate the round trip to our server) and perform a sync on the datasource.

Please notice that to make the debugging easy, you actually do not need to change any values in the edit screen, just press the done button in it - and it will add a suffix to a field which will be set to the datasource and later synced.

It is important to remember to try and scroll the listview once the edit-dialog is closed - and repeat the edit/done/scroll until it gets stuck - it does not happen consistently and sometimes takes us 5 or 6 tries to get it stuck.

We suspect that the issue is related to the sync operation, but are not sure.

Ron
Top achievements
Rank 1
Veteran
 answered on 08 Sep 2015
8 answers
1.0K+ views
When loading data into a List View I need the list to scroll back to the top when a user leaves the view and then returns.

$('.km-scroll-container').css("-webkit-transform", "translate3d(0px, 0px, 0px)");

Has worked to allow the lists to appear to be reloaded at the start of the view but when scrolled the scroller jumps back to its previous point. 
Robby Parker
Top achievements
Rank 1
 answered on 28 Jul 2015
3 answers
63 views

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

Petyo
Telerik team
 answered on 12 Jul 2015
1 answer
86 views

In my app a have a ListView with an MVVM bound DataSource. Before navigating to any view I call app.showLoading() and on every view's afterShow event I call app.hideLoading(). The problem is only on the first visit to every view hideLoading() is being triggered by the listview or its datasource so my app's loading indicator is quickly dismissed and only hidden on afterShow for subsequent visits to a view. I have hooked into the datasource requestStart, requestEnd, change, and progress events as well as the listview dataBinding and dataBound events and have found instances of e.sender._itemBinder._progressHandler = function (){e.showLoading()} and e.sender._events._progress = function (){e.showLoading()} but cannot figure out how to disable hideLoading.

 

How do you disable app.hideLoading for ListView and/or DataSource binding?

 http://docs.telerik.com/kendo-ui/api/javascript/mobile/application#methods-hideLoading

Petyo
Telerik team
 answered on 24 Jun 2015
4 answers
753 views
I cannot get my json data to display in a List. Using firebug I can see that my json file is being called but my page is printing out each character as a seperate list item ie. not recognising the json object/schema.

SCRIPT
        $(document).ready(function () {
            var ds = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "data/team.json"
                    },
                    dataType: "json"
                }
            });
            $("#listview").kendoMobileListView({
                dataSource: ds
            });
        });

JSON
[
{ name: "Bob", title: "Mr" },
{ name: "Fred", title: "Sir" }
]
Any help would be appreciated. Files attached.
Ganesan
Top achievements
Rank 1
 answered on 21 Jun 2015
1 answer
40 views
is there a way to make listview on create start from lets say page 5 of datasource so it is possible to scroll top and bottom for new pages. ( lets say datasource has 10 pages of items).
Petyo
Telerik team
 answered on 09 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?