kendo.web.js Uncaught TypeError: Cannot read property 'length' of undefined

2 posts, 0 answers
  1. Jagadeesh
    Jagadeesh avatar
    2 posts
    Member since:
    Apr 2018

    Posted 24 Aug 2020 Link to this post


    I am getting below error on our search screen.
    This happens only when searched from specific field ( Group), if we search from any other field then we do not get this error. 

    ERROR:
    kendo.web.js:5724 Uncaught TypeError: Cannot read property 'length' of undefined

    SEARCHED FIELD:
    <div class="col-md-3">
                    <div class="form-group">
                        @Html.LabelFor(model => model.Group)
                        @Html.EditorFor(model => model.Group, new { htmlAttributes = new { @class = "form-control", maxlength = 15, id = "Group" } })
                    </div>
                </div>



    KENDO.WEB.MIN.JS:
    sort:function(e,t,n,i)
    {
    var r,o,s=a(e,t),
    l=[];
    if(n=n||Z,s.length)
    {
    for(r=0,o=s.length;r<o;r++)
    l.push(n.create(s[r]));
    return this.orderBy({compare:n.combine(l)},i)
    }return this
    },



    VIEW:
    @(Html.Kendo().Grid(Model)
                    .Name("SearchGrid")
                    .Columns(columns =>
                    {
                        columns.Bound(s => s.UserID).Visible(false).HtmlAttributes(new { id = "UserID" });
                        columns.Bound(s => s.SelectAll).ClientHeaderTemplate("<input id='selectall' class='chkbx' type='checkbox' onclick='ToggleChkBox(this.checked);'> Select All</>").ClientTemplate("<input type='checkbox' class='chkbxq' id='#= UserID #' />").Filterable(false).Sortable(false).Width(100).HtmlAttributes(new { style = "text-align:center" });
                        columns.Bound(s => s.UserName).Width(145).HtmlAttributes(new { id = "UserName" });
                        columns.Bound(s => s.FirstName).Width(165);
                        columns.Bound(s => s.LastName).Width(165);
                        columns.Bound(s => s.Email).Width(225);
                    })
                    .NoRecords(true)
                    .Pageable(pager => pager.PageSizes(new int[] { 10, 20, 30, 50 }))
                    .PersistSelection(true)
                    .Sortable()
                    .Events(events => events.Change("Grid_OnRowSelect"))
                    .Scrollable()
                    .Filterable()
                    .Selectable()
                    .AutoBind(true)
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .ServerOperation(false)
                        .Model(model => { model.Id(s => s.UserID); })
                )
    )

  2. Nencho
    Admin
    Nencho avatar
    1881 posts

    Posted 26 Aug 2020 Link to this post

    Hello, Jagadeesh,

    I noticed that you had submitted another, identical ticket to this one. This is why, I would like to ask you to continue the correspondence in the other thread, in order to avoid duplication. (Ticket ID: 1481846)

    Thank you in advance for your cooperation.

    Regards,
    Nencho
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top