how can i loop for store items i want in ExtJS XTemplate?

user2513301

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'},
]
TimL

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] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

I have json data and i want to select some items only how can i do it in python?

분류에서Dev

How can I store the count of a for loop with promises that return in an arbitrary order?

분류에서Dev

How can i replace icons from tree.store with glyphs in Extjs 4.2?

분류에서Dev

How can i collect all items of an array

분류에서Dev

How can I call jQuery after show extjs window?

분류에서Dev

How can I break a symbolic link loop?

분류에서Dev

How can I iterate through a function with for loop?

분류에서Dev

How can I resolve this loop in c#?

분류에서Dev

How can I pause a loop until I get a users input?

분류에서Dev

How can I make an enum item have items of another enum?

분류에서Dev

How can I add items to Xfce root menu?

분류에서Dev

How can i check repeated items in color.xml Android

분류에서Dev

How can I change the font of my ListView items?

분류에서Dev

How can I get nth child in array of items retrieved by class?

분류에서Dev

How can I change the number of items that end up in a list

분류에서Dev

How can I store a symbol in a Rails 4 model?

분류에서Dev

How can I store a part of an array to another array in matlab?

분류에서Dev

How can i store 2 numbers in a 1 byte char?

분류에서Dev

How can I use python pandas to parse CSV into the format I want?

분류에서Dev

ExtJs:how can I create a window and load A.aspx page inside it

분류에서Dev

can I loop malloc on failure?

분류에서Dev

I want to write a batch file that internally calls python script and I want python script to return some value to the batch file. how can I do that?

분류에서Dev

Python: How can I read csv and clean my data in a loop

분류에서Dev

How can I get time efficent by creating an array with for loop?

분류에서Dev

How can I zero-pad numbers in a Batch FOR loop?

분류에서Dev

How can I run a batch file with a loop as a scheduled task?

분류에서Dev

How can I loop this script from 1 to 50 in SPSS?

분류에서Dev

How Can I Pull An Entire Result From A Foreach Loop

분류에서Dev

How can i make infinite loop with timeout function

Related 관련 기사

  1. 1

    I have json data and i want to select some items only how can i do it in python?

  2. 2

    How can I store the count of a for loop with promises that return in an arbitrary order?

  3. 3

    How can i replace icons from tree.store with glyphs in Extjs 4.2?

  4. 4

    How can i collect all items of an array

  5. 5

    How can I call jQuery after show extjs window?

  6. 6

    How can I break a symbolic link loop?

  7. 7

    How can I iterate through a function with for loop?

  8. 8

    How can I resolve this loop in c#?

  9. 9

    How can I pause a loop until I get a users input?

  10. 10

    How can I make an enum item have items of another enum?

  11. 11

    How can I add items to Xfce root menu?

  12. 12

    How can i check repeated items in color.xml Android

  13. 13

    How can I change the font of my ListView items?

  14. 14

    How can I get nth child in array of items retrieved by class?

  15. 15

    How can I change the number of items that end up in a list

  16. 16

    How can I store a symbol in a Rails 4 model?

  17. 17

    How can I store a part of an array to another array in matlab?

  18. 18

    How can i store 2 numbers in a 1 byte char?

  19. 19

    How can I use python pandas to parse CSV into the format I want?

  20. 20

    ExtJs:how can I create a window and load A.aspx page inside it

  21. 21

    can I loop malloc on failure?

  22. 22

    I want to write a batch file that internally calls python script and I want python script to return some value to the batch file. how can I do that?

  23. 23

    Python: How can I read csv and clean my data in a loop

  24. 24

    How can I get time efficent by creating an array with for loop?

  25. 25

    How can I zero-pad numbers in a Batch FOR loop?

  26. 26

    How can I run a batch file with a loop as a scheduled task?

  27. 27

    How can I loop this script from 1 to 50 in SPSS?

  28. 28

    How Can I Pull An Entire Result From A Foreach Loop

  29. 29

    How can i make infinite loop with timeout function

뜨겁다태그

보관