PDA

View Full Version : Drag and Drop feature



Sandeesh
26 Jun 2011, 10:26 PM
Hi,
I have a requirement where i need to drag a column(of 1 particular row) of a grid and drop it in an empty column of another grid.

My first grid has 1 column whereas the second has 2 columns including a blank column.
While doing this d&d i dont wish to create a new record.
Is it possible to have such thing implemented??if yes plz can u share the idea??Thanks in advance.

skirtle
28 Jun 2011, 11:48 AM
I have a requirement where i need to drag a column(of 1 particular row) of a grid and drop it in an empty column of another grid.

This doesn't make sense: 'a column (of 1 particular row)' is just a cell. I doubt that's what you mean, otherwise you'd have just said that, but this leaves me with no idea what you really mean.


While doing this d&d i dont wish to create a new record.

This is also ambiguous. Do you mean you don't want to have to create a new record instance or a new record subclass (i.e. what happens when you call Ext.data.Record.create())? I don't think either will be necessary but it depends on the specifics of what you're trying to do. Creating a new instance of a record will be required if you want to add new rows to your grid but I don't see any mention of that. If what you're trying to do is drag a column then it isn't clear how the data from the first grid would line up with the data in the second grid: isn't this just a complicated way of doing column hiding?

Whichever of the many possibilities you're trying to solve, one method that may be of interest to you is gridpanel's reconfigure().

Sandeesh
29 Jun 2011, 2:12 AM
You are absolutely right!!!
grid.reconfigure was exactly what i was looking for..
It now shows me the dragged values in Grid2
Thanks a lot