$("#exapi_grid").find(".command-copy").on("click", function(e)
{
apiid = $(this).data("row-id");
apikey = $(this).closest('tr').children('td:eq(2)').text();
var oInput = document.createElement('input');//'textarea'
oInput.value = apikey;
document.body.appendChild(oInput);
oInput.select();
document.execCommand("Copy");
oInput.className = 'oInput';
oInput.style.display='none';
alert('Key copied to clipboard');
});