Kendo ui 为什么可以';我是否在剑道UI网格中使用select函数?

Kendo ui 为什么可以';我是否在剑道UI网格中使用select函数?,kendo-ui,kendo-grid,kendo-asp.net-mvc,Kendo Ui,Kendo Grid,Kendo Asp.net Mvc,当我使用这个函数时,它会给我一个错误 var grid = $("#Grid").data("kendoGrid"); var currentSelection = grid.select(); Firefox显示错误:您必须确保在网格上设置了属性 <%:Html.Kendo().Grid<Product>() .Name("grid") .Selectable() .DataSource(dataSource => // configure the dat

当我使用这个函数时,它会给我一个错误

 var grid = $("#Grid").data("kendoGrid");
 var currentSelection = grid.select();

Firefox显示错误:

您必须确保在网格上设置了属性

<%:Html.Kendo().Grid<Product>()
.Name("grid")
.Selectable()
.DataSource(dataSource =>
    // configure the data source
    dataSource
    .Ajax()
    .Read(read => read.Action("Products_Read", "Home"))
)
%>

//配置数据源
数据源
.Ajax()
.Read(Read=>Read.Action(“Products\u Read”,“Home”))
)
%>