paste from Excel

Hi,

i am trying to paste values from Excel to the grid, it pastes but at the end of a block of data is pasting a blank cell, like this



1 2 3

5 6 7

null



how can i solve this i am using this code:



mygrid.enableBlockSelection();

mygrid.attachEvent(“onKeyPress”,onKeyPressed);

mygrid.setActive();



function onKeyPressed(code,ctrl,shift){



if(code==67&&ctrl){

mygrid.setCSVDelimiter("\t");

mygrid.copyBlockToClipboard();

}

if(code==86&&ctrl){

mygrid.setCSVDelimiter("\t")

mygrid.pasteBlockFromClipboard();

}



return true;

}



Please help!!!



Problem already fixed in latest build - please use attached file instead of original one.

dhtmlxgrid_selection.zip (3.04 KB)


HI! I have the same problem in this build “v14_71022” are you sure you include this Fix?



 



Regards,

i have the same problem too but i use addRowFromClipboard() method and always have null string in grid with id 0

add the next command to the grid’s init

grid.enableCSVAutoID(true);

thanks for answer, but i have resolved this problem by added to dhtmlXGridObject.prototype.csvParser in “for” iteration string
if (!data[i] && i==data.length-1) continue;