MattL
MattL

Reputation: 1362

Use CellSelectionModel with autoEdit:true in SlickGrid

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?

Upvotes: 1

Views: 2362

Answers (2)

ron
ron

Reputation: 1097

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(); });

Upvotes: 1

dxvargas
dxvargas

Reputation: 815

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.

Upvotes: 1

Related Questions