This question is locked. New answers and comments are not allowed.
I am using the latest MVC grid. I am grouping by Date. My group header shows both date and the time is always 12:00. How can I customize the grouping header to show the date only - no time.
Here is my code:
@using Telerik.Web.Mvc.UI
@(Html.Telerik().Grid(Model)
.Name("Grid")
.Columns(columns => {
columns.Bound(c => c.TimeStamp).Format("{0:t}").Width(120);
columns.Bound(c => c.Operation).Width(180);
columns.Bound(c => c.Details);
columns.Bound(c => c.UserName).Width(130);
})
.Footer(false)
.Sortable()
.HtmlAttributes(new {
@class = "maxHeight"
})
.Scrollable(scrolling => scrolling.Height("auto"))
.Groupable(grouping => grouping.Groups(groups => {
groups.Add(c => c.TimeStamp.Date);
})
)
)
Here is my code:
@using Telerik.Web.Mvc.UI
@(Html.Telerik().Grid(Model)
.Name("Grid")
.Columns(columns => {
columns.Bound(c => c.TimeStamp).Format("{0:t}").Width(120);
columns.Bound(c => c.Operation).Width(180);
columns.Bound(c => c.Details);
columns.Bound(c => c.UserName).Width(130);
})
.Footer(false)
.Sortable()
.HtmlAttributes(new {
@class = "maxHeight"
})
.Scrollable(scrolling => scrolling.Height("auto"))
.Groupable(grouping => grouping.Groups(groups => {
groups.Add(c => c.TimeStamp.Date);
})
)
)