[英]How can get certain field value from dataSource in kendo UI
我已經定義了dataSource,如下所示:
var dataSource = new kendo.data.DataSource({
data: [
{Id: 1, name: "Jane Doe", description: "some description", numberValue: "3000.00" },
{Id: 2, name: "John Connor", description: "description temp", numberValue: "1800.00" },
{Id: 3, name: "T-100", description: "descr tmp", numberValue: "2200.00"}
],
schema: {
model: {
id: "Id",
fields: {
Id: { type: "number" },
name: { type: "string" },
description: { type: "string" },
numberValue: { type: "number" }
}
}
}
});
如何從dataSource獲取某些字段值? 例如:我想要獲取字段numberValue的值(其中Id = 1,或Id = 2或Id = 3)。 如果我調用dataSource.data.numberValue,則什么都沒有發生。 任何幫助真的很感激。 先感謝您。
dataSource.data顯然是一個數組。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.