1

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.

David
  • 4,266
  • 8
  • 34
  • 69
  • Take a look at http://stackoverflow.com/questions/9399771/how-to-add-an-empty-item-to-extjs-combobox on how to add an empty item to your combo box, – oberbics Nov 18 '16 at 09:11
  • @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 Nov 21 '16 at 04:34

1 Answers1

1

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

LellisMoon
  • 4,810
  • 2
  • 12
  • 24