1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    6
    Vote Rating
    0
    venkatadineshp is on a distinguished road

      0  

    Question getSelectedRecords, getSelectionCount in List

    getSelectedRecords, getSelectionCount in List


    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

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    52
    Vote Rating
    0
    won.rhee is on a distinguished road

      0  

    Default


    You can simply do 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){
    
    		console.log(thisComponent.data);
    
    	}
    });

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar