:: Forum >>

i wrote a drag and drop row script

i needed a row selection and move script.
you can download it from http://webmail.mbn.ch/table/dragdroprows.js
or try it from http://webmail.mbn.ch/table/musel.htm
save it and include the script into the gridfile.
you must provide a global var var gridasGridObj = obj;
pointing to the grid Object.
I kept the code straight, separating event-handling from grid-handling
I normally programm in PHP, so i was not able to build the functions in the grid object (uff, i tried but gave up).

how to use it:
select a few rows (if multiselection is enabled - otherwise only one row)
go to the row index and drag the selected to the desired position (again the row index)
the ctrl-key toggle between copy and move
I tested it with "multiple selection.htm" and "paging1.htm",
the paging need a call of dragdropAttach(); after refreshing the grid

So i hope that somebody can use the code or build the functionality into the grid.

(i think it is not a good idea to insert the whole code here , but maybe if someone tested it and found all these nasty bugs, hidden somewere)

Andres Obrero from Winterthur Switzerland
Friday, March 11, 2005
Works great for the first drag and drop.

But the 2nd attempt does not seem to work.

Frank (Canada)
Friday, March 11, 2005
Nevermind. It works great :-)
Saturday, March 12, 2005
Great work Andres!

I tested the autoresize feature which resizes the column content perfect but did not resize the column header. Is this a bug or is it intended to do so?

The drag and drop works great!


Lets hope that Alex is picking up all this good new features and fixes and puts them into version 1.1 or 2.0 or whatever is released next.

Please Alex!

Go on!
Monday, March 14, 2005
Very nice and usefull script.... :D

How can I pass row order value to PHP, so I can insert it to database... ???
Saturday, May 21, 2005
I am trying to make it work in IE. However, neither the demo found in http://webmail.mbn.ch/table/musel.htm, or my own scripts work. Am I missing something ? Any suggestions ?
Monday, June 13, 2005
I can't access the address [http://webmail.mbn.ch/table/musel.htm] provided. It comes up with forbidden access when I visit the link.

Would anybody be as good to make this available for me as I would like to see how he achieves this functionality.

Thanks in advance.
Tuesday, June 14, 2005
I haven't looked at any backend code yet. Is this thing tied to a database recordset? I'd like to connect it to an SQL table or view...
Thursday, July 28, 2005

In open-modeling we use drag and drop it works in both browsers properly. In drag mode the cells dont have the same size as the original row. In gecko the grid flickers which is caused by floating.
A screen shot can be found at http://open-modeling.sourceforge.net see menu Reference guid => Editing => Editing data => Editing text or if you are lazy :
The code indeed is not so nice a global is not what you need. But to do it properly you must understand eventhandling and the grid complete and it works.
It is also a feature which Alex can bring in standard with a switch.

John Ophof
Thursday, July 28, 2005
Does anyone have a Version 2.0 sample of dragging & dropping rows?

Rob Francis
Tuesday, January 31, 2006

This topic is archived.

Back to support forum

Forum search