【发布时间】:2014-12-21 05:49:16
【问题描述】:
我正在使用 Kendo 网格的 html 助手来显示一些数据。网格使用的模型具有 DateTime 可为空的属性,我想在网格中显示按 myDateTime 属性降序排序的项目,首先使用空值。
我已经设法按降序显示它们,但最后显示空值。有什么想法可以先显示空值,然后再显示降序排序的值?
@(Html.Kendo().Grid<MyVm>()
.Name("myGrid")
.Columns(columns =>
{
columns.Bound(m => m.myDateProperty);
})
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.Sort(s => s.Add("myDateProperty").Descending())
.Model(model => model.Id(a => a.Id))
.ServerOperation(false)
.Read("myMethod", "myController"))
【问题讨论】:
标签: c# asp.net-mvc-4 kendo-ui kendo-grid kendo-asp.net-mvc