Regression in R1 2023.
columns.Bound(p => p.OrderDate).HtmlAttributes(new { title = "Order Date: #=kendo.toString(OrderDate, 'dd-MM-yyyy')# " });
kendo.toString is not executed and as a result the date is not formatted. The exact value of the title attribute, as shown above is rendered as title of the cell.
The logic is executed and the OrderDate value is rendered in the title with the specified format.
Hi,
We plan to include a fix in the upcoming release R1 2023 SP1, which is due in mid March.
As a temporary workaround, the value of the title attribute can be set with js after the Grid is loaded with data:
1. Attach a DataBound event handler to the Grid:
.Events(ev => ev.DataBound("onDataBound"))
2. Execute the following logic in the handler:
function onDataBound(e) {
var grid = e.sender;
grid.tbody.find("td[title*='Order Date']").each(function () {
var row = $(this).parents('tr')
var dataItem = grid.dataItem(row);
var content = $(this).attr("title");
var template = kendo.template(content);
var title = template(dataItem);
$(this).attr("title", title);
});
}
Regards,
Ivan Danchev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.