Upgrade to 2014.2.903 is making invalid template error for hierarchical grid

4 posts, 0 answers
  1. Wim
    Wim avatar
    2 posts
    Member since:
    Jan 2013

    Posted 15 Sep 2014 Link to this post

    after upgrading to latest version of kendo asp.net mvc 2014.2.903, it is making javascript error "Invalid Template".
    It is observed that error occurs if hierarchical grid is filterable, for testing here is the sample code take from the example, i have changed this code to make sub grid as Filterable


    @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.EmployeeViewModel>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(e => e.FirstName).Width(110);
                columns.Bound(e => e.LastName).Width(110);
                columns.Bound(e => e.Country).Width(110);
                columns.Bound(e => e.City).Width(110);
                columns.Bound(e => e.Title);
               
            })               
            .Sortable()
            .Pageable()
            .Scrollable()
            .ClientDetailTemplateId("template")
            .HtmlAttributes(new { style = "height:430px;" })
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(6)
                .Read(read => read.Action("HierarchyBinding_Employees", "Grid"))            
            )        
            .Events(events => events.DataBound("dataBound"))
    )

    <script id="template" type="text/kendo-tmpl">
        @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
                .Name("grid_#=EmployeeID#")
                .Columns(columns =>
                {
                    columns.Bound(o => o.OrderID).Width(70);
                    columns.Bound(o => o.ShipCountry).Width(110);
                    columns.Bound(o => o.ShipAddress);
                    columns.Bound(o => o.ShipName).Width(200);
                })
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(10)
                    .Read(read => read.Action("HierarchyBinding_Orders", "Grid", new { employeeID = "#=EmployeeID#" }))
                )
                .Pageable()
                .Sortable()
                .Filterable()
                .ToClientTemplate()
        )
    </script>
    <script>
        function dataBound() {
            this.expandRow(this.tbody.find("tr.k-master-row").first());
        }
    </script>
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 16 Sep 2014 Link to this post

    Hi Wim,


    Please excuse us for this inconvenience. The issue is reproducible when a filterable Grid is placed inside a client template and we found it shortly after the release. It is already fixed in the latest internal build, that you could download from your profile.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Francis
    Francis avatar
    5 posts
    Member since:
    Jan 2014

    Posted 04 Nov 2014 in reply to Dimiter Madjarov Link to this post

    I am having the same issue.  Upgraded to 1008 and still have it.
  4. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 05 Nov 2014 Link to this post

    Hello Francis,


    I answered the support ticket on the same topic. We would need a project, which demonstrates the issue in order to assist further. Lets continue the discussion in the support thread.

    I am looking forward to hearing from you.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top