PDA

View Full Version : how to Add default item in combo list



senchaui
2 Jul 2015, 3:16 AM
Do we have any property to add default item to all combo list, on select of that default item it should set empty value
for example:
actual data :{ red , blue, green, white}

but while showing in picker list it should be
1. default
2.red
3.green
4. white

jdkhamba
2 Jul 2015, 3:54 AM
The values in a combo list are dependent on the store that is bound to it. You would just have to insert an empty value in the beginning in order to achieve what you are trying to achieve. There is no option of a default value.

f.baron
3 Jul 2015, 3:05 AM
Try using a listener on 'load' event.



listeners: {
load: function(store) {
store.add({
value: 'defaultValue'
});
}
}