2010-08-18 79 views
0
var debtProtectionId = 0 
    // get the selected id of debt protection dropdown 
    if (mainPanel.generalPanel.calculationsFieldSet.debtProtection.getValue() != '') { 
     debtProtectionId = mainPanel.generalPanel.calculationsFieldSet.debtProtection.getValue(); 
    } 
    // get the store record with this id 
    var storeRecord = planCombinationsStore.getAt(debtProtectionId) 

當我運行代碼時它說'storeRecord是未定義的'。Ext.JS Store Record is undefined

這可能是什麼原因造成的?

回答

3

Store.getAt預計其內部集合的索引。你的意思是Store.getById