Reputation: 3628
i have 'n' fieldsets with same id. Each fieldset has some 4 combos (with itemId, displayField and valueField properties). I need to get the displayField values of all the combos in each fieldset. i tried the following,
var fieldSets = Ext.query('#fieldsetid');
for (i = 0, maxi = fieldSets.length; i < fieldSets.length; i ++) {
var form = new Ext.form.BasicForm(fieldSets[i].parentNode);
var values = form.getValues(); //This line returns valueField value
}
With above code i can get the value of valueField of the combo. How can i get the displayText of the combo? Any ideas?
Upvotes: 0
Views: 950
Reputation: 3628
i got myself.. get the valueFields from above code in the question. Using it iterate the appropiate store to get the displayLabel as
for (var key in values) {
var keyValue = values[key];
store.each(function(record) {
if (record.get(your valueField) == keyValue) {
values[key] = record.get( your display name);
}
});
}
Upvotes: 0