i have store which contains all data about items. also it contains data which can have multiple values. i have been searching for hours and couldn't find answer. maybe i'm searching wrong way or for wrong solution for this problem. so can i group them or something like this so i can loop through data i want???:
parents: [
{name: 'parentName', type: 'string'},
{name: 'parentLastName', type: 'string'},
{name: 'parentAge', type: 'number'}
]
children: [
{name: 'childName', type: 'string'},
{name: 'childLastName', type: 'string'},
{name: 'childAge', type: 'number'},
]
Your question could do with some more detail. Normally you would load data into your store via a proxy and access it via StoreManager. So if your store contains records, you could loop through them like this:
var store = Ext.data.StoreManager.lookup('<my store ID>');
// don't forget to store.load(); if autoload is false
store.each(function(record,id){
// Do something with each record
console.log(record);
});
To get a field from the record you could do, for example:
record.get('parentName');
Hope this helps. If not, please provide more info
Tim
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다