I'm trying to apply formatting to a column in my kendo grid on the DataBound Event. The DataBound event throws a javascript function where i'm trying to select a column and apply some Date formatting. The bound column looks like this:
columns.Bound(c => c.CreatedDate).Title("Submitted on").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains"))).Format("{0: MM/dd/yyyy HH.mm.ss}");
The reason i need to do it there is because i have a button that filters the grid, and upon refreshing the data in the grid it loses the formatting on the date. The current code i have is:
function onDataBound(e) {
var grid = $("#MyGrid").data("kendoGrid");
grid.tbody.find('td').each(function () {
var dataItem = grid.dataItem(this);
if (dataItem.CreatedDate) {
$(this).DoTheFormatting
}
});
Need help with the jquery selector