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

TreeList "Unable to get property 'loaded' error when calling expand/collapse.

3 Answers 173 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 10 Nov 2015, 03:48 PM
Full error to post with code snippet:
Unhandled exception at line 53, column 10735 in http://cdn.kendostatic.com/2015.1.429/js/kendo.all.min.js
0x800a138f - JavaScript runtime error: Unable to get property 'loaded' of undefined or null reference

kendo.all.min.js method throwing error: var i=e.loaded()



Code Snippet:  error is thrown when line 12 is called:  treelist.expand(row[i]);  TreeList has over 24 rows with child rows of data.

TreeListCollapseExpandChildRows: function(treeListName, expandType, direction)
{
    var treelist = $('#' + treeListName).data('kendoTreeList');
    // single row...
    if (expandType == "single")
    {
        var row = treelist.content.find('tr.k-treelist-group');
        for (var i = 0; i < row.length; i++) {
            switch (direction)
            {
                case "expand":
                    treelist.expand(row[i]);
                    break;
                case "collapse":
                    treelist.collapse(row[i]);
                    break;
            }
        }
   }
    else
    {
        // all rows and all their nested subrows ...
        var rows = treelist.content.find('tr.k-treelist-group', treelist.tbody);
        $.each(rows, function (idx, row) {
            switch (direction) {
                case "expand":
                    treelist.expand(row);
                    break;
                case "collapse":
                    treelist.collapse(row);
                    break;
            }
        });
    }
}

3 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 12 Nov 2015, 07:59 AM

Hello Nicholas,

Please try upgrading to the Q3 SP1 and see if the issue persists. If it does, please provide a runnable Dojo snippet to allow us to reproduce the issue, so that we can provide a suggestion or a bug fix.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Nicholas
Top achievements
Rank 1
answered on 12 Nov 2015, 05:41 PM
Thanks for getting back to me Alex.  As it turns out we are not able to use the Razor Toolbar Helper function for the TreeList control.  Instead, the work around was to create the control entirely in JavaScript and assign our HTML string to the property

"toolbar": template

to get the functionality we needed. 
0
Alex Gyoshev
Telerik team
answered on 13 Nov 2015, 12:39 PM

Hello Nicholas,

Yes, setting a toolbar template is not supported at this time. We have raised the issue priority so that it gets fixed soon.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeList
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Nicholas
Top achievements
Rank 1
Share this question
or