剣道データソースで剣道パネルバーを作ろうとしています。この行のjquery.min.jsファイルで「未定義のプロパティの長さを読み取れません」というメッセージが表示されますvar panelBar = $("#foodGroups").kendoPanelBar({dataSource: ds }).data("kendoPanelBar");
。私のデータソースが原因だと思います。以下は、剣道データソース形式の例です。データソース データの形式が正しくありませんか? コード:
function populateFoodGroups() {
var ds = new kendo.data.DataSource({});
var pData = [];
if (_theFoodGroups.length > 0) {
var groups = [];
for(var y = 0; y < _selectedMealType.allMealFoodGroup.Code.length; y ++) {
pData.push({text:_selectedMealType.allMealFoodGroup.Code[y].description,
contentUrl: 'file:///data/data/VCare.International.Observations/files/12590FAA-5EDD-4B12-856D-F52A0A1599F2/Views/Phone/checkboxes.html'});
if($.inArray(_selectedMealType.allMealFoodGroup.Code[y].myMealFoodGroup.description, groups) === -1){
groups.push({text: _selectedMealType.allMealFoodGroup.Code[y].myMealFoodGroup.description, content: pData[y]});
}
}
for(var z = 0; z < groups.length; z ++) {
//panelBar.append({text: groups[z].text, items: pData[z]});
ds.add({text: groups[z].text, items: groups[z].content});
}
var panelBar = $("#foodGroups").kendoPanelBar({dataSource: ds }).data("kendoPanelBar");
}
}