copySelectionToClipboard
Copies the selected items to the clipboard.
Parameters
includeHeaders Boolean
If set to true, the copied items will include the column headers.
Example
<div id="grid"></div>
<a class="k-button" onclick="selectAndCopy()">Select and copy</a>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "productName" },
{ field: "category" }
],
dataSource: {
data: [
{ productName: "Tea", category: "Beverages" },
{ productName: "Coffee", category: "Beverages" },
{ productName: "Ham", category: "Food" },
{ productName: "Bread", category: "Food" }
]
},
selectable: "multiple, cell"
});
function selectAndCopy() {
var grid = $("#grid").data("kendoGrid");
grid.select('td');
grid.copySelectionToClipboard(true);
}
</script>