PDA

View Full Version : [SOLVED] Grid to Grid Drag'n'Drop - Drag to a row



pouniok
27 Jul 2009, 12:36 AM
Hello,


I was wondering if it is possible to drag a row from a grid, to a row of another grid ?

I can easily Drag a row from a grid to the other one, but the problem is :
- My first grid is listing people
- My second grid is listing teams
- When I drag a person to a team, I need go get the ID of the person, and the ID of the team to send my ajax update request.

For now, I'm just able to get the record of the dropped element in the notifyDrop fonction. Is it possible to get the record of the row over which it's dropped ?


Thanks for any help :)
Pouniok.

pouniok
27 Jul 2009, 2:00 AM
Found a solution :

- Added a renderer to put the person id in the dom element : meta.attr = 'id="'+rec.get('e.id')+'"';
- Get the id in the dom with the event target : var emp_id = Ext.get(e.getTarget()).id;

Don't know if there is a better solution, but it's working :)