1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    368
    Vote Rating
    3
    ttbgwt is on a distinguished road

      0  

    Default Unanswered: toggle columns editable or not

    Unanswered: toggle columns editable or not


    I used to be able to do this in 3.4, but can't figure out how to do it in 4.1?

    Code:
            var cm = grid.getColumnModel();
            cm.setEditable(cm.findColumnIndex('asset_class'), true);

  2. #2
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    368
    Vote Rating
    3
    ttbgwt is on a distinguished road

      0  

    Default


    I've gotten this far, but I don't even want a cell's editor to appear. How can I turn off and on cell editing?

    Code:
            var columns = me.getView().getHeaderCt().getGridColumns();
            var i;
            for (i = 0; i < columns.length; i++) {
                if (columns[i].getEditor() !== undefined) {
                    columns[i].getEditor().setReadOnly(!state); //this only makes editor readonly, I want to disable editor
                }
            }

  3. #3
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    368
    Vote Rating
    3
    ttbgwt is on a distinguished road

      0  

    Default


    Figured it out:
    Code:
            //create cell editing plugin
            var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
                clicksToEdit: 1,
                listeners: {
                    beforeedit: function (e, editor) {
                        if (!me.cellEditingEnabled) {
                            return false;
                        }
                    }
                }
            });

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar