derekc
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' }
]
})
win.show();
}
else {
win.hide();
win.x = Ext.get(e.getTarget()).getX();
win.y = Ext.get(e.getTarget()).getY();
win.show();
}
}
}
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,
Derek
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' }
]
})
win.show();
}
else {
win.hide();
win.x = Ext.get(e.getTarget()).getX();
win.y = Ext.get(e.getTarget()).getY();
win.show();
}
}
}
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,
Derek