Hi,
I am using a list which is populated with contents in a store. I want to pass the index of selected row or record to different panel. I tried to get the index or the current record of selection using getSelectedRecords, getSelectionCount methods. But I always end up getting 0 (zero) for getSelectionCount and '[]' in case I use getSelectedRecords. Can any one please help me with this.
Code:
Trial.views.ResultsList = new Ext.List({
id : 'resultsList',
store : Trial.resultsDataStore,
itemTpl :'<div class="list-item-Source">{originCity}</div>'
+ '<div class="list-item-Destination">{destinationCity}</div>',
onItemDisclosure:function(thisComponent){
// Trial.SelectedRecordNumber = this.getSelectionCount();
console.log(this.getSelectedRecords());
Trial.views.viewport.setActiveItem(Ext.getCmp('resultDetailsPanel'));
}
});
Thanks