Sencha Touch 交流 QQ 群 224711028
1.将value为grid的option设置为默认项
Ext.getCmp('viewPortSelect').setValue('grid');
2.从controller覆盖原有option
Ext.getCmp('theSelect').setOptions(
[ {text: 'First Option', value: 'first'},
{text: 'Second Option', value: 'second'},
{text: 'Third Option', value: 'third'}
]);
参考: http://stackoverflow.com/questions/7595669/how-to-make-the-default-text-in-a-select-field-grey-like-the-placeholder-for-tex