0

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.

nilesh
  • 315
  • 2
  • 11
  • 24

1 Answers1

4

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/

Krzysztof
  • 15,900
  • 2
  • 46
  • 76
  • Thanks, Can you just point out what is wrong that i am doing in the fiddler, i have the pluginId https://fiddle.sencha.com/#fiddle/e7e – nilesh Nov 30 '14 at 14:06
  • The problem in your code is that in `actioncolumn` handler first argument is of type `Ext.grid.View` not `Ext.grid.Panel`. Grid is available via `view.panel`. I've also changed back plugin type from rowediting to cellediting. See fixed fiddle: https://fiddle.sencha.com/#fiddle/e7m – Krzysztof Nov 30 '14 at 18:03