Hi,
I thought I'd ask on here first, but I am struggling to find any nice way to paste into the grid selected cells.
I am using multiple cell selection:
.Selectable(selectable => selectable.Enabled(true)
.Mode(GridSelectionMode.Multiple)
.Type(GridSelectionType.Cell))
I am anticipating I need to manually handle the paste event by registering for the paste event.
$(function () {
$("#weldgrid").bind("paste", function (e) {
var pastedText = undefined;
if (window.clipboardData && window.clipboardData.getData) {
pastedText = window.clipboardData.getData('Text');
} else if (e.clipboardData && e.clipboardData.getData) {
pastedText = e.clipboardData.getData('text/plain');
}
// TODO: Process input for tab/newlines
// iterate through selected cells
// write associated value to each one
}
}
I've come across this thread already which went dead after one response.
http://www.telerik.com/forums/copy-and-paste-rows-in-kendo-ui-asp-net-mvc-grid
For me the demo does not work and the API Docs in IE11 are all over the place. I am struggling to find my way around the layout/structure of the pages.
Now my question is, how can I nicely iterate through each cell in the range and set the value?
I can see that:
var grid = $("#grid").data("kendoGrid");
var currentSelection = grid.select();
currentSelection.each(function () {
// $(this) is the selected cell
}
Thanks
Andez