Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow standard browser selection mode (for copy/paste) #87

Closed
kbdguy opened this issue Apr 23, 2015 · 53 comments
Closed

Allow standard browser selection mode (for copy/paste) #87

kbdguy opened this issue Apr 23, 2015 · 53 comments

Comments

@kbdguy
Copy link

kbdguy commented Apr 23, 2015

I will frequently browse a grid, and see something I want to copy (for a subsequent "paste" into another application) in a cell or maybe multiple cells. Seems like that's not supported in this grid: I can't select anything for copy/paste. If I'm right, then I'd like to make a request to get that functionality added somehow!

@ceolter
Copy link
Contributor

ceolter commented Apr 23, 2015

yes your right, that's not supported, and yes your right, that would be
cool. thanks for putting it onto the list. i guess we should have 'user
selects cells', and then ctrl+c to copy the selection into the clipboard as
csv or similar.

On 23 April 2015 at 20:36, kbdguy notifications@github.com wrote:

I will frequently browse a grid, and see something I want to copy (for a
subsequent "paste" into another application) in a cell or maybe multiple
cells. Seems like that's not supported in this grid: I can't select
anything for copy/paste. If I'm right, then I'd like to make a request to
get that functionality added somehow!


Reply to this email directly or view it on GitHub
#87.

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Statements and opinions expressed in this e-mail may not
represent those of the sender. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender immediately and delete
the material from any computer.

@okonovalenko
Copy link

Is this functionality available yet?

@ceolter
Copy link
Contributor

ceolter commented Jul 2, 2015

nope, sorry.

@pillaiv
Copy link

pillaiv commented Jul 7, 2015

Is it possible to copy multiple rows from excel and paste into the grid ?

@ceolter
Copy link
Contributor

ceolter commented Jul 7, 2015

Is it possible to copy multiple rows from excel and paste into the grid ?

no, afraid not.

@okonovalenko
Copy link

CTRL+C one cell at least would be a killer feature, waiting patiently :)

@ceolter
Copy link
Contributor

ceolter commented Aug 13, 2015

:) yea, i hear yea, it's on my list, honest, just so busy, eg i've just finished implementing 'master / slave' grids, which allows grid footers!!!

@RemiAWE
Copy link

RemiAWE commented Aug 28, 2015

It seems to be caused by the property -webkit-user-select: none; on the class ag-root. Why do you use this property ?

@ceolter
Copy link
Contributor

ceolter commented Aug 28, 2015

to make the grid behave more like a grid. if your in excel, for example, it's not normal to select text in the cell, but cells as a whole. my plan is in the future, to allow cell selection. and then ctrl+c to copy those cells. for now, the plan is to get ctrl+c to copy the selected rows.

@rajal2
Copy link

rajal2 commented Sep 3, 2015

eagerly waiting for this copy/paste feature!

@sarinderv
Copy link

+1 for this feature

2 similar comments
@1dolinski
Copy link

+1 for this feature

@byunru
Copy link

byunru commented Nov 18, 2015

+1 for this feature

@ghost
Copy link

ghost commented Nov 20, 2015

Just wanted to mention that ag-grid was very interesting to us, but missing feature was a deal breaker for our company adopting ag-grid

@ceolter
Copy link
Contributor

ceolter commented Nov 21, 2015

I can't win them all. Give me a few months early next year, all the standard grid features will be in.

@spacem
Copy link

spacem commented Dec 7, 2015

small hack to get this mostly working through css - may cause other problems
div.ag-root {
-webkit-user-select:text;
-moz-user-select:text;
-ms-user-select:text;
user-select:text;
}

@sarinderv
Copy link

The hack does enable copy from individual cells, like http://ui-grid.info
However, paste does not format correctly (tried with Windows - FF, Chrome, IE). Ideally, it should have 'user selects cells' and then paste the selection into the clipboard as CSV or similar.

@YULPontifex
Copy link

+1 for this feature

@PierrePIRONIN
Copy link

+1

@Roriz
Copy link

Roriz commented Apr 6, 2016

+1 for this feature

@ceolter
Copy link
Contributor

ceolter commented Apr 14, 2016

this is implemented in v4 of ag-Grid Enterprise. you range select (or select rows) and can copy to clipboard.

@ceolter ceolter closed this as completed Apr 14, 2016
@openseah
Copy link

openseah commented Nov 3, 2016

CTRL+C one cell still not available, i don't know why using -webkit-user-select: none.
I think CTRL+C one cell should be basic function like other grid.

@ceolter
Copy link
Contributor

ceolter commented Nov 7, 2016

@openseah yes it is, go here:
https://www.ag-grid.com/example.php
select a cell, ctrl+c, that cell gets copied

@gsawasthi25
Copy link

CTRL+C only works when rowModelType is standard.

How to make it work if we are using viewport ?

@ceolter
Copy link
Contributor

ceolter commented Dec 2, 2016

CTRL+C only works when rowModelType is standard. not true. it works with viewport. eg it's working on the example here: https://www.ag-grid.com/javascript-grid-viewport/

@pdavin-zz
Copy link

This doesn't work if you have suppressCellSelection on. We don't want the web grid to behave like Excel, so that's why we have that turned on. Standard browser selection mode would have a text cursor when the mouse is over text (not a pointer), and the cursor would select text (ie, you could select part of a word or sentence within a cell, rather than just the whole cell). Any chance we could get standard browser selection capabilities when suppressCellSelection is on?

Here are my full grid options (excluding columnsDefs + rowData):
enableSorting: true,
suppressCellSelection: true,
suppressContextMenu: true,
suppressMenuFilterPanel: true,
suppressMenuMainPanel: true,
suppressMenuColumnPanel: true,
suppressRowClickSelection: true

@prinks17
Copy link

prinks17 commented Apr 6, 2017

Is the copy cell data(through Control +C ) feature available only for Enterprise edition of Ag-grid?

@a497988
Copy link

a497988 commented Jun 14, 2017

Is there a way to select only certain text in a cell and copy?

@fantasybei
Copy link

have the same question as @a497988 mentioned

@jkjha
Copy link

jkjha commented Aug 8, 2017

Very disappointed to know one of the required feature is Enterprise only feature.
In this case, user like me need to be cautious before simply using ag-grid (assuming its free).

@emileindik
Copy link

Do you know if the workaround @spacem gave breaks any functionality?

@Mage111
Copy link

Mage111 commented Nov 7, 2017

same question.
just want to select and copy text from the grid

@avshyz
Copy link

avshyz commented Dec 19, 2017

+1 for this feature.

@Mage111
Copy link

Mage111 commented Dec 20, 2017

just change the default css solved the problem.
-webkit-user-select:text; -moz-user-select:text; -ms-user-select:text; user-select:text;

@nite
Copy link

nite commented Feb 15, 2018

I've created a gist/directive that seems the closest to the best of both worlds for me
https://gist.github.com/nite/dea82d184411a51fc6bc6adc7edaa422

  • essentially you can have cell selection mode, so you can copy to clipboard on a cell or range of cells selection, but cell selection will also highlight a row (eg. if you have contextual actions on a row, then this is a better UX)

@sekoyo
Copy link

sekoyo commented Apr 26, 2018

The enterprise copy feature copies a whole row, how can I just copy the cell? (which would be a more common choice in my opinon). I can see the latest AG Grid in the Balham demo seems to work but I can't seem to select individual cells with v14.2

@Lazarencjusz
Copy link

@Mage111 it solvs just selection problem, still you are not able copy selected text by ctrl + c, however RMP menu copy works.

@jianghan200
Copy link

just change the default css solved the problem.
-webkit-user-select:text; -moz-user-select:text; -ms-user-select:text; user-select:text;

In this way, all the data are stick together without blank or tab, how to solved this?

@quy-ho-dh
Copy link

create new class and apply this css
{ -webkit-user-select:text; -moz-user-select:text; -ms-user-select:text; user-select:text; }
after combine with cellRendererFramework to use this className for that cell

@gportela85
Copy link
Member

see: https://www.ag-grid.com/javascript-grid-properties/ - enableCellTextSelection

@kbdguy
Copy link
Author

kbdguy commented Apr 17, 2019

I believe enableCellTextSelection is limited to "enterprise" edition, so other work-arounds are valuable.

@gportela85
Copy link
Member

@kbdguy The enableCellTextSelection is applied directly to the cell and should work with community version.

@kbdguy
Copy link
Author

kbdguy commented Apr 18, 2019

@gportela85 Thanks! I don't understand what you mean by "applied directly to the cell." In Community edition, the attribute is not available as a member of the ColDef interface or the GridOptions interface or GridOptions.api or GridOptions.columnApi. Or is this something new? I'm using version 20.

@gportela85
Copy link
Member

gportela85 commented Apr 19, 2019

@kbdguy It was introduced in 20.1 as part of the gridOptions

@petersg83
Copy link

Add enableCellTextSelection: true in the gridOptions

@Cinema180
Copy link

Cinema180 commented Sep 30, 2019

I have raised a bug regarding the cell text selection feature. When cell text selection is enabled and a column is not editable, double-clicking text in a cell results in the highlighted selection bleeding over into other cells: #3411

@kanine
Copy link

kanine commented Mar 6, 2020

When you set enableCellTextSelection to true it causes numeric alignments to shift to the left.

ie those with type: "numericColumn"

Community Edition.

@AllaSorokina
Copy link

We have "enableCellTextSelection" set to true, it works on Chrome fine, but doesn't do anything on Safari.
Any advice how to solve it for Sarari?

@chamikara1998
Copy link

Add this to your stylesheet
.ag-root{
-webkit-user-select: auto !important;
}

@misaunde
Copy link

misaunde commented Apr 12, 2021

I want to be able to select a row if I click on it and copy data from the cell I clicked on. Is this possible?
For example:

suppressRowClickSelection: false,
rowSelection: 'single',
onSelectionChanged: onSelect,
enableCellTextSelection: true

suppressRowClickSelection appears to change the copy/paste behavior to copy the entire row (instead of just the cell I was at) or no copy/paste at all (depending on other settings).

@mohammedRaiyan
Copy link

Hi ... Is it possible to over ride the default copy,paset and select all options in the browser when user selects a text pop then a custom copy paste options

@mohammedRaiyan
Copy link

Uploading Screenshot_2021-08-07-19-20-52-076_com.android.chrome.jpg…
`

It is possible to change the copy paste options

@deepikagupta31
Copy link

Is there any feature to enableCellTextSelection only for a particular row?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests