Vishnu Menon
Vishnu Menon

Reputation: 1

In ExtJS 4, how to retan grid value after drag and drop between grids?

Based on the example off the Extjs 4 site i gor the grid to grid DnD working, but I need to retain the source grid value ( in the example it is automatically getting deleted). The link to the example: http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/dd/dnd_grid_to_grid.html

I dont see any part in the code where the data from he source grid is getting deleted. Is it done automatically?

Upvotes: 0

Views: 2001

Answers (3)

DevPro
DevPro

Reputation: 21

just put the viewConfig in ur Grid View file as below :

viewConfig: { copy: true, plugins: { } }

this allows your source Datastore to retain n only copies the record to target on DND actions.

Upvotes: 0

Olivier
Olivier

Reputation: 21

Make sure you use allowCopy and copy in the viewConfig. It won't work if you put it in the grid config or plugin config.

Upvotes: 2

user1325651
user1325651

Reputation: 1

Set allowCopy:true and copy:true for grid view of source grid. then it will copy from source grid and paste in destination grid.

Upvotes: 0

Related Questions