【发布时间】:2016-02-16 18:48:00
【问题描述】:
我的 html 代码中有以下剑道网格,如果没有数据,我会尝试隐藏它。我对如何执行此操作感到困惑,因为我使用的是数据源而不是迭代某些内容来添加数据。
@(Html.Kendo().Grid<CustomerQuickHistory>()
.Name("TransactionDetails")
.Columns(cols => {
cols.Bound(c => c.DateOfItem).Format("{0:MM/dd/yyyy}");
cols.Bound(c => c.ProductName);
cols.Bound(c => c.Price);
})
.DataSource(ds => ds
.Ajax()
//.Group(g => g.Add(d => d.CustomerName))
.Sort(s => s.Add(ad => ad.DateOfItem).Descending())
.Read(r => r.Action("TransactionHistory_Read", "Customers", new { customerId = Model.CustomerId }))
)
)
【问题讨论】:
标签: c# html kendo-ui kendo-grid kendo-asp.net-mvc