Hi,
I'm hijacking this thread to report a similar problem with Telerik UI for ASP.NET Core. I know that it's technically a different product, but my issue:
- is also related to template columns
- started to appear with the 2019 R1 release of the Grid
- is also about a stack overflow
Example code:
<div class="row">
<div class="col-md-12">
@(Html.Kendo().Grid<ProductViewModel>()
.Name("gridAjusteBajaPosterior")
.Columns(columns
=>
{
columns
.Template("<input
id='chk#=ProductID#' type='checkbox' class='k-checkbox
row-checkbox'><label style='text-align: right; margin-top: 3px;
margin-left: 10px;' class='k-checkbox-label'
for='chk#=ProductID#'></label>")
.Width(ViewBag.GridButtonColumnWidth)
.HtmlAttributes(new { style = "white-space: nowrap" })
.ClientHeaderTemplate("<input id='chkSelectAll' type='checkbox'
class='k-checkbox row-checkbox'><label style='text-align: right;
margin-top: 3px; margin-left: 10px;' class='k-checkbox-label'
for='chkSelectAll'></label>");
columns.Bound(m => m.ProductID);
columns.Bound(m => m.ProductName);
})
.Sortable()
.Pageable()
.AutoBind(true)
.DataSource(dataSource => dataSource
.Custom().Transport(t => t.Read(r => r.Url("https://demos.telerik.com/kendo-ui/service/products").DataType("jsonp")))
)
)
</div>
</div>
View Model:
public class ProductViewModel
{
public int ProductID { get; set; }
public string ProductName { get; set; }
}
Some details:
- this worked perfectly fine up to at least 2018 R2 (2018.2.620). It stopped working when I upgraded to 2019 R1 (2019.1.220), without any changes on the code from my part (I jumped straight from 2018 R2 to 2019 R1, so I can't comment on 2018.3.911)
- the above code only breaks if I set the column with with a value from ViewBag. I'm checking that the ViewBag (and the GridButtonColumnWidth property) is not null. Currently it's value is 87. If I use that value directly, it works just fine.
- it only breaks on template columns. Setting the column with using the ViewBag on regular columns works just fine.
- I'm getting a StackOverflowException
Console output:
Emmsa.Test> info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Emmsa.Test> Executed action method Emmsa.Test.Controllers.TestControllerIndex (Emmsa.Test), returned result Microsoft.AspNetCore.Mvc.ViewResult in 0.2429ms.
Emmsa.Test> info: Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor[1]
Emmsa.Test> Executing ViewResult, running view Index.
Emmsa.Test>
Emmsa.Test> Process is terminated due to StackOverflowException.