Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extjs combo default Value?

Tags:

combobox

extjs

                               {
                                            xtype:'combo',
                    name : 'policyId',
                    fieldLabel : 'policyTyep',
                    padding : 'padding-left: 20%',
                    displayField : 'analysisName',
                    valueField : 'analysisId',
                    queryMode : 'local',
                    //value:-1,
                    value: {analysisName:'Select..',
                            analysisId:0},
                    store : policyDetailTypeStore
                }
                       If I the policyDetailTypeStore is loaded ,but have no data.

then I want to show "Select..." in the combox.I also have configure the value as the code, but Can't work at all..

like image 990
daixfnwpu Avatar asked Aug 03 '26 12:08

daixfnwpu


1 Answers

you should actually be using the emptyText config attribute for this

{
   ...
   emptyText : 'Select ...',
   ...
}
like image 106
Black Avatar answered Aug 07 '26 07:08

Black



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!