Grid Group not rendering on IE8

3 posts, 0 answers
  1. Tito
    Tito avatar
    8 posts
    Member since:
    Sep 2012

    Posted 25 Sep 2012 Link to this post

    Hi, I am having a problem with the groupping of the telerik grid, in firefox is working, in IE8 is infinity loading, and it trows the error:

    Line: 8
    Error: 'aggregates' is null or not an object
     'length' is null or not an object


      @( Html.Kendo().Grid(Model)

                       .Name("Grid")
                       .ClientDetailTemplateId("inventoryTemplate")

                       .DataSource(ds => ds.Ajax()
                                       //TODO: Problem in here
                                       .Group(g => g.Add(c => c.GradeCode))
                                       .PageSize(50)
                                       
                                       .Sort(sort => {
                                           sort.Add(p => p.SizeThick).Ascending();
                                           sort.Add(p => p.SizeLength).Ascending();
                                           sort.Add(p => p.SizeWidth).Ascending();
                                           })
                                                 //.Aggregates(aggregates =>
                                                 //{
                                                 //    aggregates.Add(x => x.GradeID);
                                                 //})
                                        
                                       .Model(m =>
                                       {
                                           m.Id(p => p.StockID);
                                           m.Field(p => p.QuantityToEnquiry).DefaultValue(1);
                                       })
                               .Read(r => r.Action("Read", "Home"))
                       )

                            .ToolBar(toolBar =>
                                       toolBar.Custom()
                                           .HtmlAttributes(new { id = "sendEnquiry" })
                                           .Text("Send Enquiry")

                                   )
                               .ToolBar(toolBar =>
                                           toolBar.Custom()
                                               .HtmlAttributes(new { id = "clearFilter" })
                                               .Text("Reset Filters")

                                       )
                           .ToolBar(toolBar =>
                               toolBar.Custom()

                                   .Text("Export To Excel")
                                   .HtmlAttributes(new { id = "export" })

                                   .Url(Url.Action("Export", "Home", new { page = 1, pageSize = "~", filter = "~", sort = "~" }))


                           )

                       .Columns(columns =>
                       {
                           columns.Bound("Selected")//p => p.Selected)
                               .Sortable(false)
                               .Filterable(false)


                               .ClientTemplate(


                              "<input type='hidden' name='list.Index' value='#=StockID#'/>" +
                              "<input type='checkbox' id='list_#=StockID#__Selected' name='list[#=StockID#].Selected' value='false'/>"


                           ).Width(5);

                           columns.Bound(p => p.GradeCode).Width(10)
                               .Filterable(false).Sortable(false).HeaderTemplate(@<text>
                                  @(Html.Kendo().ComboBox()

                                .DataValueField("GradeCode")
                                .Placeholder("Grade Code")


                                          .DataTextField("GradeCode")
                                          .Name("GradeCode")
                                                      .DataSource(ds => ds.Read(rea => rea.Action("GetGradeCodeList", "Home")))
                                              .Events(ev => ev.Change("onComboGradeCodeChange"))
                                  )
                                    </text>)

                               .ClientGroupHeaderTemplate("<b class='header-title'>Grade Code</b>: <label class='header-value'>" + "#=value# </label>");

                           columns.Bound(p => p.SizeLength).HeaderHtmlAttributes(
                                 new { @class = "filter-class" }
                               ).Width(10).Filterable(true);
                           columns.Bound(p => p.SizeWidth).Width(10);
                           columns.Bound(p => p.SizeThick).Width(10);
                           columns.Bound(p => p.Qty).Width(10);
                           columns.Bound(p => p.WeightKG).Width(15);

                           columns.Bound(p => p.LocationDescriptionShort)
                               .ClientTemplate("#=LocationDescriptionShort# ")
                               .Width(20).Filterable(false).Sortable(false).HeaderTemplate(@<text>

                          @(Html.Kendo().ComboBox()
                          .DataValueField("LocationDescriptionShort")
                          .Placeholder("Location")


                                  .DataTextField("LocationDescriptionShort")
                                  .Name("LocationDescriptionShort")
                                  .DataSource(ds => ds.Read(rea => rea.Action("GetLocationList", "Home")))

                              .Events(ev => ev.Change("onComboLocationChange"))
                          )
                            </text>);


                           columns.Bound(p => p.Opco).Filterable(false).Sortable(false).HeaderTemplate(@<text>
                          @(Html.Kendo().ComboBox()

                          .DataValueField("Opco")
                          .Placeholder("Company")


                          .DataTextField("Opco")
                          .Name("Opco")
                              .DataSource(ds => ds.Read(rea => rea.Action("GetCompanyList", "Home")))

                              .Events(ev => ev.Change("onComboCompanyChange"))
                          )
                            </text>);
                           columns.Bound("QuantityToEnquiry").Filterable(false).Sortable(false)
                               .ClientTemplate("<input class='qtyToEnquiry' type='text' value='1' />");
                            
                          
                       })  
                                                                                                     .Events(ev => { ev.DataBound("onDataBound"); })
                                                                           .Pageable()
                                                                           .Sortable(s => s.SortMode(GridSortMode.MultipleColumn))
                                                                           
                    )



    <script id="inventoryTemplate" type="text/kendo-tmpl">

       @(Html.Kendo().TabStrip()
                .Name("TabStrip_#=StockID#")
                .SelectedIndex(0)
                .Items(items =>
                {
                    items.Add()
                    .Text("Details")
                    .Content(
                    
                        "<div class='inventory-details'>" +
                            "<ul>" +
                                "<li><label>Full Grade: </label>#= GradeDescription #</li>" +
                                "<li><label>Stock Reference: </label>#= StockRef #</li>" +
                                "<li><label>Cut/Mill Edge: </label>#= MillEdges #</li>" +
                            "</ul>" +
                            "<ul>" +
                                "<li><label>Memo: </label>#= OtherDetails  #</li>" +
                                "<li><label>Vessel: </label>#= Vessel #</li>" +
                                "<li><label>Producer: </label>#= Producer #</li>" +
                                "<li><label>Detailed Location: </label>#= LocationDescription #</li>" +
                            "</ul>" +
                        "</div>"
                    );
                })
                .ToClientTemplate())
            

    </script>
  2. Mohan
    Mohan avatar
    15 posts
    Member since:
    Apr 2011

    Posted 19 Jul 2013 Link to this post

    Any suggestions...? Even I am stuck here with the same issue along with another example like

    The Grid extensions for Kendo UI Grid Excel Export Javascript functions  work good,, however after we deployed the Excel extension code to production, we found that some of our users were not able to even view the landing page where the grid resided in IE - 8.   I am struggling to get around this issue. 

    It complained about "SCRIPT1028: Expected identifier, string or number "  and blank screen at the following line...

    Please help...

    ........... 
               filterable: true
                    } 
                ],
                export: {
                    cssClass: "k-grid-export-image",
                    title:  title  + "-" +  customerno , 
                    createUrl: "/ExecutiveDashBoard/Home/ExportToExcel",
                    downloadUrl: "/ExecutiveDashBoard/Home/GetExcelFile"
                },
                change: ontrafficMongridChange 
                //dataBound: ontrafficMonGridDatabound
  3. Kendo UI is VS 2017 Ready
  4. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 24 Jul 2013 Link to this post

    Hello Tito,

    Could you please say if the problem exists with the latest version Q2 2013? If possible create a JsBin example which we can inspect and investigate further.


    Kind Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top