Telerik Forums
Kendo UI for jQuery Forum
7 answers
700 views
Just when I think I have it beat another problem comes up with Listview Endless Scrolling.

Attached are a couple screenshots from my app on an iPad mini. Quick background on the app:
This view of the app - General Log - should display a list of all log entries entered into the system from the beginning of time (app time that is).  This particular log contains 4252 entries as stored in the "total" field of the datasource.  pageSize = 100 and I have verified that with each pull there are exactly 100 records returned from the server. Everything works flawlessly in the Icenium emulator and about 90% of the time when executed as a Cordova app on an iPhone4s and iPhone5.  On larger tablet devices the listview breaks 100% of the time when the endless scroll mechanism tries to fetch a new batch of records AND the user is scrolling quickly.  If you scroll very slowly through all records the endless scroll does its job and all is well - but, try scrolling fast - like all users do - and it breaks.

I know that per the documentation notes you need a minimum number of records in the pageSize so that the virtual listview can regenerate as required.  I have tried a range of pageSizes and for the phone devices 100 works well.  On the tablets it doesn't matter what the pageSize is - same results.

Overall scrolling performance with Endless scrolling enabled is also very poor.  With 100 records loaded the scrolling is choppy at best. Disabling endless scrolling and those same 100 records scroll like butter.

Screenshots:
1) Blank area at top of listview.  This seems to happen when the virtual listview can't keep up with the scrolling and once this happens the only way to recover is to close the view and reopen it.  No new pages will be pulled from the server and scrolling breaks almost completely.  My assumption is that the threshold/trigger that causes the datasource to update is too high and by the time the data is pulled from the server the scrolling has already passed the virtual limit and it can't recover.  Can the threshold be modified to update the datasource when the scroller hits 50% of the data instead of the default 66% or whatever it is?

2) Continuing to scroll down from the "blank" top of #1 you reach the bottom of the active scroller and it will not continue fetching pages and you can see the rendering of list items becomes unstable - note the overlapping list items.

Here is my code - there may be a glaring error but I can't see it.  Again, everything works like expected in the emulator and almost always on smaller devices - problem is severe on tablets - both iOS and Android.  I'll try any suggestions and report back - I find it hard to believe I'm the only one experiencing this type of problem.

// GENERAL LOG
var genLogDataSource = new kendo.data.DataSource({
    pageSize: 100,
    serverPaging: true,
    transport: {
        read: {
            url: "https://xxxxxxxx.xxx/xx/xxx/generalLog.php",
            type: "GET",
            dataType: "json"
        },
        parameterMap: function(options) {
            return {
                take: options.take,
                skip: options.skip
            };
        }
    },
    schema: {
        data: "ds",
        total: "total"
    }
    });

function initGenLog(){
    $("#listview-genlog").kendoMobileListView({ 
        dataSource: genLogDataSource, 
        template: $("#listview-genlog-template").html(),
        endlessScroll : true, 
        click: function(e){
            var fileId = e.target.attr('fileId');
            if(fileId) openFile(fileId);
            else return false;
        }
    });
}
Petyo
Telerik team
 answered on 13 Sep 2013
4 answers
263 views
Hi 

Im having an issue where the first fixed header overlaps the search box when using filtering + fixed headers.


See http://jsfiddle.net/52kyv/4/

How can i get round this ?



Petyo
Telerik team
 answered on 13 Sep 2013
1 answer
239 views
Hi 

I have a NumericTextbox bound to a model variable in MVC. I'm reading a decimal value from a database (123.50) , but it is displayed as 123.00. I included the relevant Kendo culture file kendo.culture.en-ZA.min.js , and initialized the correct culture with

$(function () {
    kendo.culture("en-ZA");
});

Any idea why the places after the decimal point are not showed?


Georgi Krustev
Telerik team
 answered on 13 Sep 2013
1 answer
804 views
I need to do some server side validation of data that is being updated on a large grid and wanted to give the user an idea of where any validation errors occurred in the grid.  Ideally it would be by highlighting the row/cell and having a mouse over or other error message associated. 

What I have done so far is:
Controller:
ModelState.AddModelError(Item.Id, "this value is outside of the valid range");
JavaScript grid error handler
01.function error_handler(e) {
02.    var data = e.sender._data;
03.    if (e.errors) {
04.        $.each(e.errors, function (key, value) {
05.            highlightError(data, key, value);
06.        });
07.    }
08.}
09. 
10.function highlightError(data, key, value) {
11.    var grid = GetGrid("grid");
12.    for (var i = 0; i < data.length; i++) {
13.        var row = data[i];
14. 
15.        if (row.id == key) {
16.            var hasError = $('[data-uid="' + row.uid + '"]');
17.            hasError.addClass('kendo-error-row');  //this seems to be working, but it doesn't survive the whole process.
18.            hasError[0].mouseover = function () { alert(errors[error].value); };
19.        }
20.    }
21.}
It seems like the code is working, but it doesn't seem to stick around until the end and if I use the IE developer tools it doesn't show the new class or have the mouseover.  What am I missing?

Thanks!

Vladimir Iliev
Telerik team
 answered on 13 Sep 2013
3 answers
263 views
Hi,

I am using a splitview with 2 panes, and throughout my mobile app would like to access the name of the view in the pane with ID "right-pane". 

A simplified structure of my splitview can be seen below:

<div data-role="splitview">
    <div data-role="pane" id="left-pane" data-layout="side-default" data-transition="slide">
             
        <div data-role="layout" data-id="side-default" data-show="toggleBackButton">
            <!-- my layout stuff's in here -->       
        </div>
 
        <div data-role="view" id="lp_index" data-title="Smith & Co">
            <!-- view stuff in here -->
        </div>         
 
    </div>
 
    <div data-role="pane" id="right-pane" data-layout="main-default" data-navigate="onNavigate">
        <div data-role="layout" data-id="main-default">
            <!-- layout stuff -->
        </div>
        <div data-role="view" >
            <!-- view stuff here -->
        </div>
    </div>
</div>
As you can see, the right-pane has a data-navigate property set to onNavigate, which is hooked up correctly. The contents of that function is as follows:
<script>
        var app = new kendo.mobile.Application(document.body);
 
        function onNavigate(e) {
            alert($("#right-pane").data("kendoMobilePane").view());
        }
</script>
When navigating around I get 2 alert boxes saying: "null" and "[object Object]".

I've probably been staring at the code too long and need a fresh pair of eyes to point out a silly mistake! 

Thanks in advance.

Petyo
Telerik team
 answered on 13 Sep 2013
3 answers
186 views
our single page app using angularjs is near completion.

One ng-view screen is attached - using kendo controls since there is benefit for this screen to make use of DataSourceRequest, listview/pager

I've integrated with kendo using directives - that is the screen you see.


When trying to add interaction with angularjs  using ng-click - it doesn't work.  Probably since this dom was added outside of angularjs's dom manipulation.
<script type="text/x-kendo-tmpl" id="FilterByTypeItemTemplate">
    <li><a href="\##:Name #" ng-click="FilterByType('#:Name #')"><i class="icon-chevron-right pull-right"></i><em class="pull-right">(#:Count #)</em> #:Name #    </a></li>
</script>


And this is the problem....  How do I get kendo template to work with angularjs?

I also don't see a datasourcechanged event on listview to notify me when the datasource underneath has been changed. 



Robert
Top achievements
Rank 1
 answered on 13 Sep 2013
2 answers
765 views
How can i change the text "Show items with value that: "that is located in the grid filter widget.

Thanks
Svetlin
Top achievements
Rank 1
 answered on 12 Sep 2013
0 answers
76 views
Hi, 

Today, I upgraded our web proejct to use jQuery 2.0.3 with Kendo UI 2013.2.717. I then brought in the debug version of the migrate plug-in and that is where I saw a lot of code within Kendo UI needs to be updated/changed to get on to use the jQuery 2.0.3 w/o requiring the migrate plug-in. 

I am attaching a screen shot of what I saw in my Chrome console. This is just a few list of errors, but I see a lot more all over our application. I wanted to know when can I expect these to be addressed so our application can run on the latest jQuery version and not require migrate plug-in. 

Thanks, 
Taz. 
Murtaza
Top achievements
Rank 1
 asked on 12 Sep 2013
2 answers
112 views
Hi,
I had a problem when trying to embed z-index databinding. Below is my DOM:
<div id="ItemContainer0" class="textItem ui-draggable" data-bind="style:
{height: Height + 10 + 'px', width: Width + 10 + 'px', top: Y - 6 + 'px', left:
X - 6 + 'px', 'z-index': Z}" index="0" style="height: 60px; width: 210px; top:
77px; left: 135px;">

The "width", "height", "top", "left" are rendered to "style" but z-index is not.
What is my mistake?
Please help me this problem. I searched google for a long time but I didn't see any answer.

Thank you.
John Vu
John
Top achievements
Rank 1
 answered on 12 Sep 2013
6 answers
393 views
Hi

Does anybody have any experience with using a treeview in  a tabstrip?

I am loading a dynamically loaded treeview in a tabstrip, but when I unfold an option in the treeview , the treeview breaks out of the tabstrip.
Is there a way to have a scroll bar in the tabstrip or in the treeview?

Thanks for helping me out!

Henk Jelt
RAV44
Top achievements
Rank 2
 answered on 12 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?