:: Forum >>

Ctrl-C Ctrl-V in an exteded editable grid.

I use the following code to copy and paste in an editable extended aw grid.

The problem is that the grid totally frozes after the ctrl-v.


obj.setEvent("onkeyup", function(item){
if(event.ctrlKey){
if(event.keyCode==67){
var c = obj.getCurrentColumn();
var r = obj.getCurrentRow();
document.all.txtCopia.value = obj.getRowTemplate(r).getItemTemplate(c).getCellProperty('text');}
if(event.keyCode==86){
var c = obj.getCurrentColumn();
var r = obj.getCurrentRow();
obj.getCellTemplate(c,r).setCellProperty('value',document.all.txtCopia.value);
obj.getCellTemplate(c,r).setCellProperty('text',document.all.txtCopia.value);
obj.getCellTemplate(c,r).refresh();
}
}
});

Anyone could help me?
Thank you in advance.
Monday, May 22, 2006
I forgot the name...
Del.
Del
Monday, May 22, 2006
Noone has got any clue?
This problem is still bugging me...
On the ctrl-v the grid stop working....
Del
Tuesday, May 23, 2006
Alex can you help me?
I still don't have a clue on how to make it work.
Del
Wednesday, May 24, 2006
Maybe this will work better -

obj.onKeyCtrlC = function(event){
        var c = this.getCurrentColumn();
        var r = this.getCurrentRow();
        alert(this.getCellText(c, r));
        AW.setReturnValue(event, false); // prevent default
    }

    obj.onKeyCtrlV = function(event){
        var c = this.getCurrentColumn();
        var r = this.getCurrentRow();
        this.setCellText("123", c, r);
        AW.setReturnValue(event, false); // prevent default
    }
Alex (ActiveWidgets)
Friday, May 26, 2006
Thank you very much i'll try it right now!
Del
Monday, May 29, 2006
It does work fine, indeed!
Thank you very much again.
Del
Monday, May 29, 2006

This topic is archived.


Back to support forum

Forum search