3.2.0

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.
May 22,
I forgot the name...
Del.
Del
May 22,
Noone has got any clue?
This problem is still bugging me...
On the ctrl-v the grid stop working....
Del
May 23,
Alex can you help me?
I still don't have a clue on how to make it work.
Del
May 24,
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)
May 26,
Thank you very much i'll try it right now!
Del
May 29,
It does work fine, indeed!
Thank you very much again.
Del
May 29,

This topic is archived.

See also:


Back to support forum