Hi,
I'm not sure if I missed it in the API documents, but is there any way I can retrieve the number of items in a list, or the number of items in the store associated with the list?
Printable View
Hi,
I'm not sure if I missed it in the API documents, but is there any way I can retrieve the number of items in a list, or the number of items in the store associated with the list?
Try getCount()
Thanks! Working fine now though I'm wondering how did I even miss that :)
But it's only available for a Store and will retrieve the load operation's number of records. :s
Hi,
I am not using a store. I fill the list from within the controller, by inserting elements, as the following:
myList.insert(0, {xtype: 'textfield', value: 'abc'});
I tried getCount() and I got the result 0:
console.log("Length of list is " + myList.getCount());
Clearly, getCount() does not work for my example. What would you recommend me to use instead ?
Thank you