DataGrid - drag & Drop rearranging order

Robert Man robert at rman.on-rev.com
Wed Nov 11 07:03:26 EST 2009


Hi ! Im' trying to set up drag & drop from a formDataGrid1 to a
formDatagrid2.
• the drag reorder, within the same datagrid, as documented above, works
fine, great!
• combining both drag reorder and copy from another grid is ok too.  I test
in the dragDrop handler if the dragDrop origin is the same as the
destination, in which case I do nothing and let the DragReorderDrop do the
work. Getting the dgControl of the dragSource and the dgCOntrol of the
dragDestination seems to workfine all the time.
• BUT the drag a row from one formDataGrid to another one, does not work
fine for me yet. The objective is to drag a row and have it inserted just
after the line it is dragged onto. Getting the index of the original row is
fine via the dragData variable instanciated at the dragStart.
(http://forums.runrev.com/phpBB2/viewtopic.php?p=17191)
=> The problem is that I have not been able to get the index of the target
line. 
I tried to get the dgIndex of dragDestination : does not work
I tried to get the dgIndex of the owner of dragDestination : works half-way
(starts working but stops working on 4th drop on a dgrid that has 5 lines).
So any hidden method to do that?
Thanks a lot!
Robert

-- 
View this message in context: http://n4.nabble.com/DataGrid-drag-Drop-rearranging-order-tp346791p585825.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list