【发布时间】:2015-08-05 07:58:31
【问题描述】:
我正在使用 Kendo UI 在 ASP.NET MVC 中编写一个 Web 应用程序。我正在将 Kendo Grid 中的数据可视化如下:
@(Html.Kendo().Grid<MyModel>()
.Name("grid")
.DataSource(dataSource => dataSource // Configure the grid data source
.Ajax() // Specify that ajax binding is used
.Read(read => read.Action("ReadAction", "MyController", new { /*route values*/ }))
)
.Columns(columns =>
{
columns.Bound(n => n.Month).Title("Month").ClientTemplate("<input type='hidden' value='#=Month#' id='hfMonth'/>").Hidden();
columns.AutoGenerate(true);
})
.Pageable()
.Sortable()
现在我需要根据<select> 的更改事件触发网格更新。我怎样才能做到这一点?我从昨天开始尝试了几种可能性,但都没有成功。
【问题讨论】:
-
应用更改时。在 JS 函数中调用它
$('#Grid').data('kendoGrid').dataSource.read();
标签: c# asp.net asp.net-mvc kendo-grid kendo-asp.net-mvc