Width: 400,
Height: 300,
Layout: 'form ',
BodyStyle: 'padding: 10px ',
LabelWidth: 70,
Ults: {anchor: '20140901 '},
Items :[{
Xtype: 'iconcombo ',
FieldLabel: 'iconcombo ',
Store: store123,
ValueField: 'countrycode ',
DisplayField: 'countryname ',
IconClsField: 'countryflag ',
TriggerAction: 'all ',
Mode: 'local'
}],
Buttons :[{
Text: 'Submit ',
Handler: function (){
// Method 1: traverse combobox and delete
// Method 2: Use the combobox event to directly obtain the index and then delete it.
Var count = store123.getTotalCount ();
For (var k = 0; k <count; k ++ ){
If (store123.getAt (k). get ('countryname') = 'United States '){
Store123.remove (store123.getAt (k ));
Break;
/*
To improve performance, use the break and continue keywords in for and while.
Note the difference between break and return.
The break ends with a loop.
Return ends with this method.
*/
}
}
}
}]
Author: "shijinling87807697"