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

Problem with nested grid

2 Answers 385 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 27 Oct 2017, 05:14 AM

Hello!

Could you help me please.

I have a grid with detail rows. Inside each detail row there is a grid that has a detail rows too.

But when I click inside external detail row, all master rows of internal grid are expanding! And next click collapsing all these rows. 

Version of library - from 2014 year.

I don't understand this behavior.

 

Sorry for my bad English.

2 Answers, 1 is accepted

Sort by
0
Nick
Top achievements
Rank 1
answered on 27 Oct 2017, 05:24 AM

My code:

<script id="testerStepDetails_Template" type="text/x-kendo-template">
    <p>Some Text</p>
</script>

<script id="testerGrid_Template" type="text/x-kendo-template">
    @(Html.Kendo().Grid<SomeOtherView>()
            .Name("testerGrid_#=id#")
            .Columns(columns =>
            {
                columns.Bound(p => p.created).Title("Дата-время").Filterable(false).Sortable(false).Format("{0:dd.MM.yyyy HH:mm:ss}");
                columns.Bound(p => p.stepStatus).Title("Состояние").Filterable(false).Sortable(false);
                columns.Bound(p => p.fromUser).Title("ФИО").Filterable(false).Sortable(false);
            })
            .ClientDetailTemplateId("testerStepDetails_Template")
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(100)
                .Read(read => read.Action("SomeOtherMethod", "SomeOtherController", new { id = 123456}))
            )
            .Sortable()
            .ToClientTemplate())
</script>

 

@(Html.Kendo().Grid<SomeView>()
    .Name("testerGrid")
    .Columns(columns =>
    {
        columns.Bound(p => p.login)
            .Title("Логин").Filterable(true).Sortable(true);
       
        columns.Bound(p => p.name)
            .Title("Организация").HtmlAttributes(new { style = "max-width:140px" });

    })
    .Selectable()
    .Sortable()

    .ClientDetailTemplateId("testerGrid_Template")
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(10)
        .Batch(true)
        .Model(model =>
        {
            model.Id(p => p.id);
        })
        .Read(read => read.Action("SomeMethod", "SomeController", new { area = "SomeArea" }))

    )
    )

0
Stefan
Telerik team
answered on 30 Oct 2017, 12:32 PM
Hello, Nick,

Thank you for the provided information.

The described behavior is not expected unless there is a custom code which is expanding or collapsing the rows based on an event.

I can suggest checking the following example with three-level-hierarchical Grid demonstrating the expected result and configuration:

https://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/editing/edit-three-level-hierarchical-grid

If the issue still occurs, please use the provided example as a reference to demonstrate it or provide a new one and I will gladly assist.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Nick
Top achievements
Rank 1
Answers by
Nick
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or