Unable to copy cell values
<p>On click of the Copy link in a row, I need to create another row and copy all its contents to the new row. This is the code I have:</p>

<pre><code>addNewInlineRow(sid, idToUse); // this creates a new row with empty values
//this copies the value from old row to new row
$("#"+rowId+ " td").each(function(index){
    $("#"+idToUse+ " td").get(index).text($(this).text());
});
</code></pre>

<p>But this code is not working. Any suggestions? I cannot clone the entire TR due to existing complex logic for creating TR id!!</p>
