3.2.0

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)

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

But the 2nd attempt does not seem to work.

Frank (Canada)
March 11,
Nevermind. It works great :-)
Frank
March 12,
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!

Congratulations!

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!
Dietrich
March 14,
Very nice and usefull script.... :D

How can I pass row order value to PHP, so I can insert it to database... ???
tekno
May 21,
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 ?
anindya
June 13,
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.
Kev
June 14,
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...
Jeff
July 28,
Hi,

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 :
http://open-modeling.sourceforge.net/reference/edittext.htm.
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
John Ophof
July 28,
Does anyone have a Version 2.0 sample of dragging & dropping rows?

Rob Francis
January 31,

This topic is archived.

See also:


Back to support forum