0
votes

I have an ExtJS grid that has the CellEditing plugin attached to it. When I click on a cell to edit its content, the entire row is selected.

How do I prevent a row from being selected when I click on an editable cell in my grid?

I'm using ExtJS 4.1

Thanks

1

1 Answers

0
votes

I guess this is related to your previous question - "select row only when checkbox is clicked ExtjS 4", so I found a really hacky way - using the beforeselect, beforeedit, edit and canceledit events like:

listeners: (function(){
    var editing;

    return {
        beforeselect: function(){
            return !editing;
        },
        beforeedit: function(){
            editing = true;
        },
        edit: function(){
            editing = false;
        },
        canceledit: function(){
            editing = false;
        }
    }
}())

Working example: https://fiddle.sencha.com/#fiddle/100a