简体   繁体   中英

Extjs 5 getPlugin doesn't work for grid

How to get access to grid cellediting plugins to call startEditbyPosition to put a particular cell in editing mode. I am using Extjs 5

I have tried below code but getPlugin doesn't work as mentioned in docs for grid. http://docs.sencha.com/extjs/5.0.1/#...Ext.grid.Panel

var field = button;
debugger;
var gridpanelbidding = Ext.ComponentQuery.query('biddinggridpanel1')[0];
console.log(this);
                        var plugin = gridpanelbidding.getPlugin('biddingcelledit'); //this returns null
                        plugin.startEditByPosition({ row: 0, column: 3 });


if (field.getWidgetRecord) {
    var rec = field.getWidgetRecord();
    if (rec) {
        console.log(rec);
        //rec.set('descriptio', field.getValue());
    }
    }

Any kind of help is appreciated. Thanks in advance.

getPlugin works if you define pluginId property for plugin, not id . You can also find your plugin in grid.plugins array.

Here is fiddle showing getPlugin in work: http://jsfiddle.net/95a1c92f/2/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM