5 Replies Latest reply on Jun 20, 2007 11:57 AM by huych02

    Drag Drop, but don't insert into DataGrid


      I have 2 problems I hoping to find some help with.

      I have 2 DataGrids (A and B) setup and populated with dissimilar data. When I drag an row from A to B, I do not want the item to be inserted into B. Instead I want to capture which row in datagrid B the item was dropped on and also capture the object details from the row that was dropped (A). I think I can do this with calculateDropIndex and event.preventDefault(), but I reckoned you folks might know a better way. Any advice?

      [Conceptually, each row in datagrid B is a bucket like object. I can drag n number of rows from A into any bucket in B. (showing what each bucket contains is handled elsewhere, i just need to capture the event and dropped object)]

      In addition, when I drag a row from A to B, I want datagrid B to indicate that the user will be dropping the item on a row and not inserting between rows. ie, highlight the destination row and not insert a black line between 2 rows while hovering. I have no idea how to accomplish this. Any advice is greatly appreciated.

      J. M.