I have a hierarchical grid which is rendering fine except that the date formatting for the detail grid is being ignored and a JSON date is being rendered instead. The same formatting works fine in the Master grid. Data for the sub-grid comes from a List collection in the object that populates the master. The data was returned as one List of objects.
The detail grid renders
instead of something like
Here's the code:
The detail grid renders
/Date(-62135568000000)/01/23/2013 04:43 PM@model IEnumerable<KUI_CS_Test1.ROAMHostSvc.BatchHeader>@{ ViewBag.Title = "Kendo UI for MVC (C#) Test App";}<h2>Batch List</h2>@(Html.Kendo().Grid(Model) .Name("batchGrid") .Sortable() .Pageable() .Filterable() .Columns(columns => { columns.Bound(b => b.BatchID) .Width("200"); columns.Bound(b => b.Transmitted_DateTime) .Width("15") .Format("{0:MM/dd/yyyy hh:mm tt}") .Title("Transmitted"); columns.Bound(b => b.Completed_DateTime) .Width("15") .Format("{0:MM/dd/yyyy hh:mm tt}") .Title("Completed"); columns.Bound(b => b.Created_DTTM) .Width("15") .Format("{0:MM/dd/yyyy hh:mm tt}") .Title("Created"); columns.Bound(b => b.Created_Emp_Name) .Width("18") .Title("Created By"); } ) .ClientDetailTemplateId("transactions") .Events(e => e.DetailInit("detailInit")) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("FetchBatchList2", "Home")) ))<script id="transactions" type="text/kendo-tmpl"> @(Html.Kendo().Grid<KUI_CS_Test1.ROAMHostSvc.TransactionBase>() .Name("Transactions_#=BatchID#") .Columns( columns => { columns.Bound(t => t.ID) .Width("200") .Title("Transaction ID"); columns.Bound(t => t.Version) .Width("10") .Title("Version"); columns.Bound(t => t.TranTypeDisplayText) .Width("15") .Title("Tran Type"); columns.Bound(t => t.PostingFlagDisplayText) .Width("15") .Title("Posting Flag"); columns.Bound(t => t.Posting_DTTM) .Width("15") .Format("{0:MM/dd/yyyy hh:mm tt}") .Title("Posting Date/Time"); columns.Bound(t => t.PostingMessage) .Width("300") .Title("Posting Message"); }) .ToClientTemplate() )</script><script type="text/javascript" language="javascript"> function detailInit(e) { var grid = $("#Transactions_" + e.data.BatchID).data("kendoGrid"); grid.dataSource.data(e.data.TranCollection); }</script>