Unplanned
Last Updated: 31 Aug 2020 09:20 by ADMIN
Datafyer
Created on: 23 Oct 2019 18:51
Category: Grid
Type: Feature Request
9
Copy selected row to the clipboard

Would be helpful to have the feature of copying selected row to the clipboard.

The copy format could be CSV or just tabbed delimiter.

---

ADMIN EDIT

In the meantime, you can consider your own JS-based solution (example StackOverflow thread) and integrate them on a command button in the grid or in the row context menu.

---

2 comments
ADMIN
Marin Bratanov
Posted on: 31 Aug 2020 09:20

Hello,

We are reopening this because it might be possible and also because now Blazor has the default system.text.json serializer so that could be used.

 

Regards,
Marin Bratanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

ADMIN
Marin Bratanov
Posted on: 24 Oct 2019 07:25

Hello Patrick,

Serializing the model is not something the grid can do for you, because the requirements and specifics will vary wildly between projects. For example, date, number and currency formatting are not part of the model, they come from UI and component-specific settings. Another case that we can't cater for is that some people will want all fields serialized, other people will want only certain fields sent.

Thus, you need to define the data that you want copied.

On copying itself - this is a task that either requires plugins like Flash, or external DOM manipulations. You can find an example of the latter here: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f.

Once you implement the desired serialization and copying logic, you can invoke it from any button through the JS Interop tooling the framework provides.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor