简体   繁体   中英

Extjs combo default Value?

                               {
                                            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..

you should actually be using the emptyText config attribute for this

{
   ...
   emptyText : 'Select ...',
   ...
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM