1
votes

I have a grid in which one column is comboBox. Value in store of this comboBox is "Yes and "No". I want to keep it empty for that I deleting the value and saving the data. But After saving the data when grid is reloading the combo value is coming as "yes", though it should come as empty.

So my question is how to send empty data to combo store.

1
Take a look at stackoverflow.com/questions/9399771/… on how to add an empty item to your combo box,oberbics
@oberbics I looked there, But In my case I am sending empty data, in that case they are adding empty value to the store and then selecting. There is a difference.David

1 Answers

1
votes

This should do the trick

Ext.application({
    name : 'Fiddle',

    launch : function() {
        Ext.create({
            xtype:'window',
            width:300,
            height:200,
            items:[
                {
                    xtype:'combo',
                    store:['Yes','No','']
                },
                {
                    xtype:'button',
                    text:'reset',
                    listeners:{
                        click:function(button){
                            var combo=button.prev();
                            combo.setValue('');
                        }
                    }

                }
                ]
        }).show();
    }
});

here's the fiddle https://fiddle.sencha.com/#view/editor&fiddle/1kv7