+ @{Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
+ .TableHtmlAttributes(new {@class = "Grid"})
+ .Columns(columns =>
+ {
+ columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
+ columns.Bound(c => c.Title);
+ columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
+ })
+ //.DetailView(detailView => detailView.ClientTemplate("
<#= Overview #> <#= Path #>
"))
+ .ClientEvents(clientEvents =>
+ {
+ clientEvents.OnDataBinding("grid_bind");
+ clientEvents.OnDataBound("grid_bound");
+ })
+ .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
+ .Footer(false)
+ .Render(); }
+
Loading...
+
}
}
@section Scripts{
@@ -119,5 +131,13 @@
function episodeDetailExpanded(e) {
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
}
+
+ function grid_bind(args) {
+ $('.grid-container').children('.grid-loader').stop().css("top", "0px").fadeIn('slow');
+ }
+
+ function grid_bound(args) {
+ $('.grid-container').children('.grid-loader').stop().fadeOut('slow');
+ }
}