Do you have sample code for selecting, then copying and pasting the selected rows to other rows in the kendo ui asp.net mvc grid
Thanks,
Annie
1 Answer, 1 is accepted
0
Dimo
Telerik team
answered on 14 Oct 2014, 03:13 PM
Hello Annie,
Copy-pasting to the Kendo UI Grid can be achieved with custom code. Here is an example to help you get started. You may need to modify it according to your preferences and needs.
The idea is to add a transparent textarea over the Grid when the widget is focused. The user will actually paste inside the textarea without knowing that. When something is pasted, it will be your task to parse the pasted content and populate the Grid via its dataSource API. When the user focuses something else on the page, the textarea should be removed.
The above example expects the pasted content to match the order and number of the grid columns. You can use any other custom logic, which will suit your users' behavior, but in the standard case, you will need to require the pasted data to be in a certain format and/or meet some other requirements.
Please keep in mind that the functionality won't work if the grid keyboard navigation or selection is enabled. Generally, selection in the source Grid cannot be related to copy-pasting, because the clipboard cannot be controlled via Javascript, i.e. by Kendo UI.
In order to enhance the above example, you will need to be familiar with Grid and Grid DataSource API methods.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.