IE8 - MVC Grouping = 'length' is null or not an object

11 posts, 0 answers
  1. Bill
    Bill avatar
    11 posts
    Member since:
    Jul 2012

    Posted 21 Jul 2012 Link to this post

    I'm using the Kendo UI Grid with AJAX binding using the MVC HTML helper and the IQueryable<T>.ToDataSourceResult extension.

    Unfortunately in IE8 I am getting a 'length' is null or not an object javascript error. 

    Everything works fine in Chrome.  So it is an IE8 compatibility issue.  Any suggestions?


    Controller:

    TimeZoneCollection timeZones = new TimeZoneCollection(this.AppSettings);
    timeZones.Load();
     
    List<TimeZoneListModel> models = Mapper.Map<TimeZoneCollectionList<TimeZoneListModel>>(timeZones);
    IQueryable<TimeZoneListModel> dataSource = models.AsQueryable();
     
    return Json(dataSource.ToDataSourceResult(request));


    View:

    @(Html.Kendo().Grid<Shmiffer.Web.Areas.Admin.Models.TimeZoneListModel>()    
        .Name("grdTimeZones")
        .Groupable(grouping => grouping
            .Enabled(true))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("Index""TimeZones"))
            .Sort(sort => sort.Add(tz => tz.TimeZoneId).Ascending())
            .PageSize(10)
            .Group(group => group.Add(tz => tz.SupportsDaylightSavingTime)))
        .Filterable(filtering => filtering
            .Enabled(true))
        .Pageable(paging => paging
            .Enabled(true)
            .Info(true)
            .PageSizes(false)
            .Refresh(true))
        .Scrollable(scrolling => scrolling
            .Enabled(false)
            .Height(200)
            .Virtual(true))
        .Sortable(sorting => sorting
            .Enabled(true)
            .AllowUnsort(false)
            .SortMode(GridSortMode.SingleColumn))
    )

  2. Tomas
    Tomas avatar
    1 posts
    Member since:
    Feb 2008

    Posted 23 Jul 2012 Link to this post

    Hi,

    I would just like to add to Bill's post in that I am having the very same issue.
    Similarly, for me it is only happening in IE 8. It doesn't happen in IE9/Firefox nor Chrome.

    Controller:

    public ActionResult GetDataSource([DataSourceRequest]DataSourceRequest request)
    {
        var messages = from nm in _notificationMessageService.GetMessagesForUser(UserId)
                       select new ViewModels.NotificationMessageListViewModel()
                       {
                           Username = nm.FromNotification.User.Username,
                           DateEntered = nm.DateEntered,
                           Message = nm.Message,
                           Description ="test"
                       };
        var result = messages.ToDataSourceResult(request);
        return Json(result, JsonRequestBehavior.AllowGet);
    }


    View:
    @{
        ViewBag.Title = "Index";
    }
      
    <h2>My Messages</h2>
    @(Html.Kendo().Grid<BuddyUp.ViewModels.NotificationMessageListViewModel>()   
        .Name("Grid")
        .Columns(columns => {
            columns.Bound(p => p.Username).Groupable(false);
            columns.Bound(p => p.DateEntered);
            columns.Bound(p => p.Message);
            columns.Bound(p => p.Description)
                ;
        })
        .DataSource(ds => ds.Ajax().Group(g => g.Add(c => c.Username)).Group(g=>g.Add(c=>c.Description)).Read(read => read.Action("GetDataSource", "Message")))
        .Pageable()
        .Sortable()
        .Scrollable() 
        .Filterable()
    )

    Regards,

    Tomás
  3. Kendo UI is VS 2017 Ready
  4. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 24 Jul 2012 Link to this post

    Indeed the behavior can be observed in IE8. It is already addressed and the fix will be available for next official release, namely Q2 SP1. Of course it will be available earlier through internal builds.

    Regards,
    Nikolay Rusev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. freeTheCode
    freeTheCode avatar
    4 posts
    Member since:
    Jan 2012

    Posted 11 Oct 2012 Link to this post

    When is the fix actually coming out officially. I note this thread post is 4 months ago, surely it should be out by now.
    The version I'm seeing is V4.0.30319 which still has this issue.
  6. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 15 Oct 2012 Link to this post

    Hi,

    2012.2.913 is the build version of Q2 2012 SP1. The fix is listed in the release notes for the build.

    All the best,
    Nikolay Rusev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. MGrassman
    MGrassman avatar
    92 posts
    Member since:
    Apr 2007

    Posted 26 Mar 2013 Link to this post

    I'm getting the same issue with the latest release. 2013.1.319.340 

    When I remove the groups it works and when I add them back in it doesn't.

    Any suggestions?

    EDIT:
    I tried the latest internal build as of today 3/26 and same thing.

    I reverted back to 2012.3.1315.340 and this build works fine.
  8. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 28 Mar 2013 Link to this post

    Hello Michael,

    Can you create a sample/jsbin/jsfiddle that demonstrates the issue? Thus we'll be able to debug it locally and assist you further.

    Regards,
    Nikolay Rusev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  9. Mike
    Mike avatar
    11 posts
    Member since:
    May 2012

    Posted 04 Apr 2013 Link to this post

    I too am getting this same exact error in the Kendo UI Grid version 2013.1.319. Has a resolution been reached yet? If so, will there be a build to fix this?
  10. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 05 Apr 2013 Link to this post

    Hello Mike,

    Latest internal build addresses this issue as mentioned earlier in the thread.  

    Regards,
    Nikolay Rusev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  11. Mike
    Mike avatar
    11 posts
    Member since:
    May 2012

    Posted 05 Apr 2013 Link to this post

    Ummm, according to the control panel app, I have the latest version, 2013.1.319 (March 20, 2013). If there is a newer build, I don't see it...What am I missing? Is there an internal build out there that I cannot get through the control panel?
  12. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 08 Apr 2013 Link to this post

    Hello Michael,

    The latest internal builds are not available via Telerik Control Panel, but only in the Kendo UI Product Downloads section either on kendoui.com or telerik.com. As my colleague suggested, please migrate to the latest available internal build and let us know whether this eliminates the issue you are facing.

    Kind regards,
    Sebastian
    the Telerik team
    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