Grid Columns offset to the left by one

4 posts, 0 answers
  1. Chris
    Chris avatar
    16 posts
    Member since:
    Dec 2015

    Posted 10 Mar Link to this post

    I am trying to create a grid that has 5 static parent categories that when expanded will use AJAX to show the data within those categories. Since the categories are static I just create a model, with a Name and Type property, in the controller action and bind them directly to the grid

    @(Html.Kendo().Grid(Model.Categories)
       .Name("CategoryGrid")
        .Columns(c =>
        {
            c.Bound(b => b.Name);
            c.Bound(b => b.Type);
        })
        .ClientDetailTemplateId("result-template")
    )
     
    <script id="result-template" type="text/kendo-tmpl">
        @(Html.Kendo().Grid<ChildClass>()
            .Name("#=Name#_child")
            .Columns(c =>
            {
                c.Bound(b => b.ID);
                c.Bound(b => b.Description);
            })
            .DataSource(ds => ds
                .Ajax()
                .PageSize(20)
                .Read(r => r.Action("ChildSearch", "Search", new { Type = "#=Type#" }))
                )
            .Pageable()
            .Selectable()
            .ToClientTemplateId()
        )
    </script>

    I unfortunately can't share a screen shot as my dev box doesn't have an internet connection today, but the result is all the columns of the parent grid are offset to the left by 1.

    The values for the Name column and an empty header appears in the first column.

    The values for Type and the header "Name" appears in the second column.

    A blank view, meaning the row styles cut off at the right end of the 2nd column, and the header "Type" appear in the third column.

    So my question would be: Why is this happening?

     

    Thanks

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 14 Mar Link to this post

    Hello Chris,

     

    By offset do you mean that there is one special column which moves Grid detail template to the right as in the Grid hierarchy demo?

     

    If this is the case this is service cell, which is always rendered in this setup. 

     

    Regards,
    Nikolay Rusev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Chris
    Chris avatar
    16 posts
    Member since:
    Dec 2015

    Posted 14 Mar in reply to Nikolay Rusev Link to this post

    Screen shot attached.
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 16 Mar Link to this post

    Hello Chris,

     

    We are not sure how to replicate this. Could you send us an example of the case so that we can debug it locally and assist you further?

     

    Regards,
    Nikolay Rusev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready