PDA

View Full Version : Extjs 4.2 grid- Cut/Copy/Paste functionality like Excel



anna.daniel
20 May 2013, 3:07 AM
We have developed an application using extjs4.2 gridpanel. We need to implement the Copy/Cut/Paste functionality for the editable cells in this grid. Any help on this would be appreciated.

We have implemented the following features in this grid.
->Editable and noneditable cells
->Cell coloring
->Fixed rows/columns and coloring
->Apply calculations in columns
->Display combobox in cell
->Update the cell in another row in the same column on editing a cell.
->Use two grids in the same page
->Make scrolling of two grids in synch
->Update the cells in the second grid on editing the first grid data.
->Support enter key/left/right/down/up arrow keys

slemmon
22 May 2013, 8:27 AM
I've not seen this type of extension created before, but you might look at the drag selector in the following dataview example. It might come in handy if you are making a drag selection extension yourself:
http://docs.sencha.com/extjs/4.2.0/extjs-build/examples/view/data-view.html

anna.daniel
22 May 2013, 9:38 PM
Thank you Slemmon.

The example you have provided is not working for multiple cells.
Also we can not use the drag selection option since we need to to get the following features also in this grid.
->Copy/cut single/multiple cells from grid
->Paste these to grid itself(The noneditable cells should not be changed)
->Paste these to excel
->Paste the cells copied from excel to grid
Please share the code if these can be implemented in Ext.grid.Panel.

Thanks,

christianariasv
2 Oct 2013, 7:36 AM
Check this:

http://www.extjs4spreadsheet.com (http://www.extjs4spreadsheet.com/)

christianariasv
2 Oct 2013, 7:38 AM
Hi!,
Check this too:
http://blogs.walkingtree.in/2013/05/06/grid-to-excel-and-excel-to-grid-copypaste-in-sencha-extjs-4-x/