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

Grid Columns offset to the left by one

3 Answers 214 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 10 Mar 2016, 03:19 PM

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

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 14 Mar 2016, 07:50 AM

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
0
Chris
Top achievements
Rank 1
answered on 14 Mar 2016, 12:33 PM
Screen shot attached.
0
Nikolay Rusev
Telerik team
answered on 16 Mar 2016, 08:54 AM

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
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Chris
Top achievements
Rank 1
Share this question
or