View Full Version : How to pass cell value to ext window from an editgrid?

14 Sep 2010, 1:24 PM
This is far from pretty, but I am listening to the cellclick on an editgrid to create a new ext window (on the first click, and reposition the window on subsequent clicks). I'm wondering if/how I can populate the textarea of this ext window based on another hidden column in the same row and save the result back.

listeners: {
cellclick: function(grid, rowIndex, colIndex, e) {
if (!win) {
win = new Ext.Window({
closeAction: 'hide',
height: 300,
width: 300,
x: Ext.get(e.getTarget()).getX(),
y: Ext.get(e.getTarget()).getY(),
layout: 'form',
defaultType: 'field',
items: [
{ xtype: 'textarea', fieldLabel: 'notes' }
else {
win.x = Ext.get(e.getTarget()).getX();
win.y = Ext.get(e.getTarget()).getY();

I've also considered creating a cell template with a reference to an ext window that will show/hide based on cell validation... still very new to ExtJS so I'm not sure what the best approach would be.

Any advice, suggestions or comments would be appreciated.
Thanks in advance,

14 Sep 2010, 2:22 PM
To document my progress. The next step was being able to update text inside the ext window.

On my definition item definition during the panel creation I needed to add a ref config to the textarea

{ xtype: 'textarea', ref: 'notes', fieldLabel: 'notes' }

Then I was able to set the value like:


Next step will be to get a value from elsewhere in the same row and handle an update on window close.

15 Sep 2010, 7:02 AM
The following post helped me update another cell in the same row: