LoadContentFrom not working after upgrade to 2023.1.425 version

1 Answer 79 Views
TabStrip
Maria
Top achievements
Rank 1
Maria asked on 26 May 2023, 08:52 AM

Hi,

I upgraded Telerik version in our project (Telerik.UI.for.AspNet.Core nuget) from version 2021.2.616 to version 2023.1.425 and since then is for TabStrip component not working LoadContentFrom.

I have in my controller method like this:

public IActionResult GetProductListPartial()
{
     return PartialView("_ProductList");
}

And in my View I have code like this:

 @(Html.Kendo().TabStrip()
                .Name("tabstrip")
                .Items(tabstrip =>
                {
                    tabstrip.Add()
                            .Text(@Localizer["Menu.ProductList"])
                            .Selected(true)
                            .LoadContentFrom("GetProductListPartial", "ProductList")
                            .ContentHtmlAttributes(new { @class = "product-list-tab" });
                }))

When I reworked implementation in the View, then it started to work again:

 @(Html.Kendo().TabStrip()
              .Name("tabstrip")
              .Items(tabstrip =>
              {
                  tabstrip.Add().Text(@Localizer["Menu.ProductList"])
                      .Selected(true)
                       //.LoadContentFrom("GetProductListPartial", "ProductList")
                      .Content(@<text>@await Html.PartialAsync("_ProductList")</text>)
                      .ContentHtmlAttributes(new { @class = "product-list-tab" });
              }))
My point is, I didn't find anywhere, that LoadContentFrom is not supported anymore and also in application it's still buildable and looks like it should work. What is the required change for working it again please?

1 Answer, 1 is accepted

Sort by
1
Accepted
Alexander
Telerik team
answered on 31 May 2023, 06:40 AM

Hi Maria,

Thank you for reaching out. I really appreciate you taking the additional time and effort to share the currently utilized TabStrip implementation, as well as the temporary workaround for your scenario.

Generally, there have not been any major changes inducted for the LoadContentFrom mechanism of the TabStrip. Thus, the described behavior is indeed rather unorthodox.

Nonetheless, after further examination, I managed to reciprocate the behavior by intentionally not updating the required client-side resources.

Generally, upgrading through the NuGet Package Manager will not update the included client-side files. Therefore, you will need to upgrade the files manually in order for the files to be up-to-date with the corresponding version of the NuGet package.

You can verify this by outputting the Kendo UI client-side version within the developer's console. For example:

That being said, I recommend upgrading the included client-side files within the "_Layout.cshtml" of the application and observing whether the behavior persists. More information regarding the upgrade process is available within our documentation which can be found here:

Here is an example:

<head>
    ...
 @*Core Content Start*@

        <link href="https://kendo.cdn.telerik.com/themes/6.3.0/bootstrap/bootstrap-main.css" rel="stylesheet" type="text/css" />
	<script src="https://cdn.kendostatic.com/2023.1.425/js/jquery.min.js"></script>
	<script src="https://cdn.kendostatic.com/2023.1.425/js/jszip.min.js"></script>
	<script src="https://cdn.kendostatic.com/2023.1.425/js/kendo.all.min.js"></script>
	<script src="https://cdn.kendostatic.com/2023.1.425/js/kendo.aspnetmvc.min.js"></script>
 @*Core Content End*@
</head>

For your convenience, I am also attaching a runnable ASP.NET Core 6 application with the "2023.1.425" version of the suite with a similar TabStrip setup as yours.

Please give this suggestion a try and let me know how it works out for you.

Kind Regards,
Alexander
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.
Maria
Top achievements
Rank 1
commented on 01 Jun 2023, 09:02 AM

Hi

Thank you very much for your answer and clarification. It was very helpful and you are right after adding correct client-side files via cdn, all works correctly. 

Best regards

Maria Nemsilajova

Tags
TabStrip
Asked by
Maria
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or