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

4 posts, 0 answers
  1. Nicholas
    Nicholas avatar
    5 posts
    Member since:
    May 2015

    Posted 10 Nov 2015 Link to this post

    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;
                }
            });
        }
    }
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 12 Nov 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Nicholas
    Nicholas avatar
    5 posts
    Member since:
    May 2015

    Posted 12 Nov 2015 Link to this post

    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. 
  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 13 Nov 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready