I am trying to get the selected index from a dataview.list but I get an error when calling getSelection() function. (Uncaught TypeError: Object [object Array] has no method 'getSelection').
I run my app, filters my dataview.List and it gets 2 records back, click on button which has below code and it throws error.
Here is my code:
var value = new Array();
var myList = new Ext.dataview.List();
myList = Ext.ComponentQuery.query('#patientsList'); //patientList is the itemid of dataview.List component
value = myList.getSelection(); //it throws above error at this line
Can some one please suggest that what's wrong with the above code?
Thanks in advance.