127
Views
7
Comments
Solved
[OutSystems Data Grid] Copy/paste data from Excel to Data Grid.
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hi All,

I am working on a requirement to copy & paste data in Data Grid like, copying data from Excel and pasting in Data Grid both having same structure.

How we can use copy paste feature in Data Grid? 

If this is possible to do, please provide me the steps, it will be very much useful.

Thank You.



2021-02-11 16-27-42
Swapnil
Solution

HI @Saikumar Appana ,
Its by default behaviour to copy and paste selected rows use ctrl+v to paste rows into datagrid, make sure your columns are editable else it wont to allow to paste
Please refer below links for more information:
Copy and Paste Data into Grid

Javascript data grid clipboard

hope it helps

Just a note :
The 'paste' operation in the context menu is not possible and hence always disabled. It is not possible because of a browser security restriction that JavaScript cannot take data from the clipboard without the user explicitly doing a paste command from the browser (e.g. Ctrl+V or from the browser menu). If JavaScript could do this, then websites could steal data from the client via grabbing from the clipboard maliciously. The reason why the grid keeps the paste in the menu as disabled is to indicate to the user that paste is possible and it provides the shortcut as a hint to the user. This is also why the API cannot copy from clipboard. 

Regards,
Swapnil

2021-02-23 06-08-57
Saikumar Appana

Thank You very much Swapnil, This helps me.

Thank You

Saikumar Appana.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Saikumar Appana

The Copy&Paste functionality is offered in OutSystems Data Grid in two ways:

  1. out-of-the-box  using the keyboard Ctrl+C and Ctrl+V
  2. the Copy (not the paste) is also offered in the Context Menu as one of the out-of-the-box functionalities.

Cheers,
GM


2021-02-23 06-08-57
Saikumar Appana

Hi Martins.

Thank You for responding.

can you please help me how can i achieve this functionality.

  1. out-of-the-box using the keyboard Ctrl+C and Ctrl+V (Copy from Excel and Paste in Data Grid)

I don't have any clue from where to start this.

Thank You.

2021-02-23 06-08-57
Saikumar Appana

Actually I am looking for this pasting rows in Data Grid fromExcel

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Saikumar Appana

I'm not getting the question.
If the data types are the same you use the keyboard combinations Ctrl+C and Ctrl+V like in any other application.

Cheers,
GM

2021-02-23 06-08-57
Saikumar Appana

Hi Martins, 

Sorry, I should have mentioned this clearly, I want to perform Ctrl+C and Ctrl+V for copying Rows from Excel to Data Grid. 

Like I select 5 rows in Excel and paste them in Data grid.

This will create 5 records in Data Grid, I am looking for this requirement.

Thank You.

2021-02-11 16-27-42
Swapnil
Solution

HI @Saikumar Appana ,
Its by default behaviour to copy and paste selected rows use ctrl+v to paste rows into datagrid, make sure your columns are editable else it wont to allow to paste
Please refer below links for more information:
Copy and Paste Data into Grid

Javascript data grid clipboard

hope it helps

Just a note :
The 'paste' operation in the context menu is not possible and hence always disabled. It is not possible because of a browser security restriction that JavaScript cannot take data from the clipboard without the user explicitly doing a paste command from the browser (e.g. Ctrl+V or from the browser menu). If JavaScript could do this, then websites could steal data from the client via grabbing from the clipboard maliciously. The reason why the grid keeps the paste in the menu as disabled is to indicate to the user that paste is possible and it provides the shortcut as a hint to the user. This is also why the API cannot copy from clipboard. 

Regards,
Swapnil

2021-02-23 06-08-57
Saikumar Appana

Thank You very much Swapnil, This helps me.

Thank You

Saikumar Appana.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.