Completed
Last Updated: 24 Apr 2023 11:35 by Özkan
Release R2.2023-Increment.2(26.Apr.2023)
Luca
Created on: 17 Mar 2023 09:10
Category: ListView
Type: Bug Report
2
ListView: NotSupportedException: "ClientTemplateId or ClientTemplateHandler" cannot be null or empty.

Hi,

after we've updated at the last version, listview component stop working.

Below the code snippet:

<script type="text/x-kendo-tmpl" id="groupConfigTemplate"> <div > #:Name# </div> </script><script> function filterLinkerGroup() { return { linkerGroupId: $("#ddlLinkerGroup").data('kendoDropDownList').value() } } </script>

@(Html.Kendo().ListView<LinkerConfigViewModel>() .Name("lvLinkerGroupConfig") .TagName("div") .ClientTemplateId("groupConfigTemplate") .DataSource(source => { source.Ajax().Read(read => { read.Action("ReadLinkerGroupConfig", urlController).Data("filterLinkerGroup"); }); }) .AutoBind(false))

StackTrace Error:

 


System.NotSupportedException: "ClientTemplateId or ClientTemplateHandler" cannot be null or empty.
   at Kendo.Mvc.UI.ListView`1.VerifySettings()
   at Kendo.Mvc.UI.WidgetBase.WriteHtml(TextWriter writer)
   at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
   at Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.ViewBuffer.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Razor.TagHelpers.DefaultTagHelperContent.WriteToCore(Object entry, TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Razor.TagHelpers.DefaultTagHelperContent.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Write(Object value)
   at AspNetCore._Views_Linker_Index.<ExecuteAsync>b__14_9(TextWriter __razor_template_writer) in /Views/Linker/Index.cshtml:line 140
   at Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Kendo.Mvc.UI.SplitterPane.WriteHtml(TextWriter writer, IKendoHtmlGenerator generator, HtmlEncoder encoder)
   at Kendo.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action)
   at Kendo.Mvc.UI.Splitter.WriteHtml(TextWriter writer)
   at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
   at Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.ViewBuffer.WriteToAsync(TextWriter writer, HtmlEncoder encoder)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
   at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeResultFilters>g__Awaited|28_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

 

Also your demo page doesn't work anymore (https://demos.telerik.com/aspnet-core/listview)

2 comments
Özkan
Posted on: 24 Apr 2023 11:35
just write a value in handler, then it will work too, it just shouldn't be null or empty.
Example:
            .ClientTemplateId("template_profil")
            .ClientTemplateHandler("template_profil")
ADMIN
Alexander
Posted on: 23 Mar 2023 17:33

Hi Luca,

We have identified the bug and I am happy to let you know the team has addressed this issue with high priority and has already provided a fix which is available in the suite's latest internal build. You can find the status of the GitHub item here:

You can find the latest internal build within the Downloads section of your account:

From there, you can download all the required client-side files and embed them within your application. As for the NuGet package, if you have the private NuGet feed setup, you can directly install the internal build through the NuGet package manager:

Alternatively, you can download the "nupkg" file manually again through the Downloads section of your account.

Kind Regards,
Alexander
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.