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

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

10 Answers 189 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 21 Jul 2012, 09:39 PM
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))
)

10 Answers, 1 is accepted

Sort by
0
Tomas
Top achievements
Rank 1
answered on 23 Jul 2012, 03:54 PM

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
0
Nikolay Rusev
Telerik team
answered on 24 Jul 2012, 12:37 PM
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!
0
freeTheCode
Top achievements
Rank 1
answered on 11 Oct 2012, 11:15 PM
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.
0
Nikolay Rusev
Telerik team
answered on 15 Oct 2012, 07:29 AM
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!
0
MGrassman
Top achievements
Rank 2
answered on 26 Mar 2013, 07:56 PM
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.
0
Nikolay Rusev
Telerik team
answered on 28 Mar 2013, 07:45 AM
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!
0
Mike
Top achievements
Rank 1
answered on 04 Apr 2013, 09:35 PM
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?
0
Nikolay Rusev
Telerik team
answered on 05 Apr 2013, 07:42 AM
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!
0
Mike
Top achievements
Rank 1
answered on 05 Apr 2013, 03:22 PM
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?
0
Sebastian
Telerik team
answered on 08 Apr 2013, 08:26 AM
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!
Tags
Grid
Asked by
Bill
Top achievements
Rank 1
Answers by
Tomas
Top achievements
Rank 1
Nikolay Rusev
Telerik team
freeTheCode
Top achievements
Rank 1
MGrassman
Top achievements
Rank 2
Mike
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or