Hello,
I can’t find a way to edit my cell content before adding to clipbord because I need to clear some html to get only data.
I use this script find in the docs :
[code] function onKeyPressed(code,ctrl,shift,grid){
if(code==67&&ctrl){
if (!grid._selectionArea) return alert(“Vous devez d’abord sélectionner une cellule dans la grille.”);
grid.setCSVDelimiter(“\t”);
grid.copyBlockToClipboard()
}
if(code==86&&ctrl){
grid.setCSVDelimiter(“\t”);
grid.pasteBlockFromClipboard()
}
return true;
}
gridpai.enableBlockSelection();
gridpai.attachEvent("onKeyPress",function(code,ctrl,shift){
onKeyPressed(code,ctrl,shift,gridpai);
});[/code]
in the onkepressed function I tryed to use the selection :
var cInd = grid.getSelectedCellIndex();
var rId = grid.getSelectedRowId();
var txt = grid.cellById(rId,cInd).getValue();
but the block can be selected with the row not selected
I also tryed with js
document.execCommand("Copy");
but it doesn’t work without clicking manualy on firefox.
I used gridpai.getSelectedBlock() but it doesn’t return data.
Thanks a lot for your help !
Loïc