文檔金喜正規(guī)買球>>Kendo UI使用教程-2019>>Kendo UI for jQuery網(wǎng)格使用教程:數(shù)據(jù)綁定之本地數(shù)據(jù)
Kendo UI for jQuery網(wǎng)格使用教程:數(shù)據(jù)綁定之本地數(shù)據(jù)
Kendo UI目前最新提供Kendo UI for jQuery、Kendo UI for Angular、Kendo UI Support for React和Kendo UI Support for Vue四個控件。Kendo UI for jQuery是創(chuàng)建現(xiàn)代Web應用程序的最完整UI庫。
默認情況下,Kendo UI Grid for jQuery自動綁定數(shù)據(jù)。網(wǎng)格加載后,數(shù)據(jù)源立即發(fā)送查詢,并將數(shù)據(jù)加載到窗口小部件。 要禁用此操作,請將小部件的autoBind選項設置為false,如下所示。
$("#grid").kendoGrid({ autoBind: false, // Other configuration. });
本地數(shù)據(jù)
Kendo UI Grid使您可以將其綁定到本地數(shù)據(jù)數(shù)組。要將Grid綁定到本地數(shù)據(jù),請設置kendoGrid對象的dataSource選項。
有關可運行的示例,請參閱
var people = [ { firstName: "John",lastName: "Smith",email: "john.smith@telerik.com" },{ firstName: "Jane",lastName: "Smith",email: "jane.smith@telerik.com" },{ firstName: "Josh",lastName: "Davis",email: "josh.davis@telerik.com" },{ firstName: "Cindy",lastName: "Jones",email: "cindy.jones@telerik.com" } ]; $("#grid").kendoGrid({ dataSource: people });
如圖所示:綁定到本地數(shù)據(jù)陣列的網(wǎng)格

掃描關注慧聚IT微信公眾號,及時獲取最新動態(tài)及最新資訊
