Skip navigation
Currently Being Moderated

How to know the drop index in receiving list

Jun 16, 2012 2:35 AM

Hallo. I am trying to copy elements from list 1 to list 2, anyway in list 1 i have some objects which are different from objects in list 2 so in the dragDrop event of the list 2 i wrote event.preventDefault() to prevent the paste of a different object in the list 2 .. I want to do it manually but i want to add the new element in the right position based no where the dropindicator is but i don't know where that index is.. When you do it automatically it knows where to put the new object based on the position of the mouse.. How can i know that index??..

 

I hope you understand my request

 

Max

 
Replies
  • Currently Being Moderated
    Jun 16, 2012 5:16 AM   in reply to Maximist

    hi,

    you just put an mouse move event listener on list and check for event.target in the callback function of the mouse move event.then find the childindex of event.target in the list and put you items at that specific index in the dataprovider and then refresh the list..

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points