Teelist not expanding

2 posts, 0 answers
  1. ams
    ams avatar
    4 posts
    Member since:
    Aug 2017

    Posted 25 May 2018 Link to this post

     

    I am using a Kendo Treelist in my MVC view:

    <tr>
    <td colspan="7" style="border-style: solid; border-width: 1px; border-top: none;">
    <%: Html.Kendo().TreeList<CustomResult>()
    .Name("treelist")
                                                  
                                                .Columns(columns =>
    {
    columns.Add().Field(e => e.Text).Title("Results").TemplateId("result-template");
    })
    .DataSource(dataSource => dataSource
    .Read(read => read.Action("LoadResults", "Home").Data("additionalInfo"))
    .ServerOperation(false)
    .Model(m => {
    m.Id(f => f.RootId);
    m.ParentId(f => f.ReportsTo);
    m.Field(f => f.Text);
    m.Field(f => f.ReportsTo);
    })
    )
    .HtmlAttributes(new { style = "height: 430px;width:100%" })
    .Height(430)
    %>
    </td>
    </tr>

     

    The treelist is expandable with parent and root nodes while running in local.

    But at times,in the server deployed version,only the parent node is getting displayed and not expandable.

    Any clue on the probable reason for the issue?

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2491 posts

    Posted 29 May 2018 Link to this post

    Hello,

    Based on the available information it would be hard to pinpoint the exact cause of the behavior. However I would suggest couple of things to try that can narrow the search. 

    Please open the browser developer tools by pressing F12 and check the console for any errors listed when refreshing the page or when expanding an item. If there are that can point in the right direction. 

    Also, check the Network tab and make sure that the request to LoadResults returns the relevant items. 

    Finally, it seems that the TreeList is nested in a table. Would you place it directly on the page and see if the behavior changes?


    Regards,
    Viktor Tachev
    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.
Back to Top