<script type="text/javascript">
var tbIndex = undefined
var tbData = undefined
$('#dg').datagrid({
onClickRow:function(rowIndex,rowData){
tbIndex = rowIndex
tbData = rowData
},
onClickCell:function(rowIndex,field,value)
{
if(field == 'type' || field == 'name' || field == 'card' || field == 'money')
{
var t = $('#dg').datagrid('selectRow',rowIndex)
console.log($(t).html())
ZeroClipboard.config({moviePath: "{{ URL::to('/') }}/images/ZeroClipboard.swf"})
//copy contents()
var client = new ZeroClipboard($('#dg').datagrid('selectRow',rowIndex));
client.on( 'load', function(client) {
//alert( "movie is loaded" );
client.on( 'datarequested', function(client) {
client.setText(this.innerHTML);
} );
client.on( 'complete', function(client, args) {
alert("copy complete:" + args.text );
} );
} );
}
}
})
I am looking to enhance functionality by enabling users to click on a column and copy the contents of that specific column.