1
votes

I have a SlickGrid on my site and have implemented some copy/paste functionality. This requires that I use the CellSelectionModel, which requires that I set autoEdit to false for the grid.

I want autoEdit to be true and still be able to use my selection model. Does anyone know how to do this?

2
Isn't that counter-productive? autoEdit will change the column to the editor associated. You could however make that editor select-all text on focus, which might achieve the same as cell-selection.ganeshk
I don't quite understand your point. autoEdit will change the column('s editor?) to the editor associated (with what)? I want to select cells on click and drag, but also start editing the currently selected cell if the user starts typing (autoEdit).MattL

2 Answers

1
votes

You can have the copy/paste functionality with autoEdit true. I have it.

You can try it for yourself here: http://labs.nereo.com/SlickGrid/examples/example-excel-compatible-spreadsheet.html

Now, with a javascript console, write:

grid.setOptions({autoEdit:true})

You still can copy/paste. It is more difficult to select a range of cells... (you can't have any active cell, without more development).

But, the short answer is, you can.

1
votes

I know this is an oldie but in case anyone's still running in this issue... look for the following lines in CellExternalCopyManager.init() and remove them or comment them out. There's a comment above the code that explains why it's there but I can't reproduce that problem it describes when it's removed. I've been using this solution for years without anyone reporting any issues.

cellSelectionModel.onSelectedRangesChanged.subscribe(function(e, args){ _grid.focus(); });