Clearing expand details after a while

2 Answers 43 Views
Grid
mj
Top achievements
Rank 1
mj asked on 17 May 2023, 11:41 PM

Here is the code to show the list, it also has a part to show detail information by expanding the record, it shows the details first time you expand the record for some seconds and then clear them , and if you expand it again this time you can see details!
wonder if something triggered to clear the details or what, as it has the details so I don't think it would be matter of reading data!
@(Html.Kendo().Grid(Model)
    .Name("LSGrid")
    .AutoBind(false)
    .NoRecords(x => x.Template("<div class=\"k-grid-norecords-template\">No records found that match your search criteria </div>"))
    .Columns(columns =>
    {
        columns.Bound(p => p.Name).Title("Rail Infrastructure Manager").HeaderHtmlAttributes(new { style = "font-weight: bold" });       
        columns.Bound(p => p.Ref).Title("Line section ID").HeaderHtmlAttributes(new { style = "font-weight: bold" });

    })
        .Events(e => e.DetailExpand("detailExpand"))
        .ClientDetailTemplateId("template")
    .Pageable( pageable => pageable.ButtonCount(10))
    .Sortable()
    .Scrollable(scr=>scr.Height(300))
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)       
        .ServerOperation(true)
        )
)

<script id="template" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<Dto>()
            .Name("grid_#=Id#") // template expression, to be evaluated in the master context
            .Columns(columns =>
            {
                    columns.Bound(o => o.Id).Title("State/Territory").Width(110);
                columns.Bound(o => o.StartKm).Title("Start Km Point").Width(110);
                columns.Bound(o => o.EndKm).Title("End Km Point").Width(110);
            })            
            .Pageable()
            .ToClientTemplate()
    )
</script>

detailExpand: function (e) {
        var dataItem = e.sender.dataItem(e.masterRow);
       e.detailRow.find(".k-grid").data("kendoGrid").dataSource.data(dataItem.Jurisdictions);
    },

Version of Kendo.MvC.dll as reference of project is 2021.2.616
Thanks       

2 Answers, 1 is accepted

Sort by
0
Missing User
answered on 23 May 2023, 09:44 AM

Hello,

Thank you for contacting us.

Please expect one of our Product Specialists to contact you and provide more details about the inquiry.

If you have any questions, feel free to let me know.

Regards, Teodora Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

0
Eyup
Telerik team
answered on 23 May 2023, 11:03 AM

Hi MJ,

 

Thank you for writing to us.

This seems most likely a script error interfering. Could you open the page on Chrome browser and enable the F12 inspector console to check if there are any errors?

And also, can you open the Network tab of the console and double-check if there are any requests that are made back to the server after expanding the detail item content?

 

Regards,
Eyup
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Tags
Grid
Asked by
mj
Top achievements
Rank 1
Answers by
Missing User
Eyup
Telerik team
Share this question
or