2

I want to disable the rowediting plugin depends on a combo selection, I have the grid reference. How can I disable it? (I try to destroy it, but then when I close the window, i get a "Uncaught TypeError: Cannot call method 'getView' of undefined ".

HyGy
  • 121
  • 3
  • 10

1 Answers1

2

Return false from the RowEditing beforeedit event.

listeners: {
    beforeedit: function(editor, context){
        if(comboBox.getValue() === /* whatever conditions you have */){
            return false;
        }
    }
}

You can also set context.cancel = true to achieve the same effect, but I don't really see the point in it since returning false from a beforexyz event is a standard idiom in the Ext JS 4 library.

Eric
  • 6,965
  • 26
  • 32