Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
760
Drag/Drop between two grids
posted

I am following the article at http://blogs.infragistics.com/blogs/alex_fidanov/archive/2009/07/28/drag-amp-drop-with-datapresenter-family-controls.aspx but trying to implement between two grids. The difference in the functionality that I am trying to implement is that I want to get the record where the drop occurred. So for instance if I drag a record from one grid to another, I want to get the record on which I dropped the record.

I would appreciate if I can be assisted with this.

Tahir

  • 69686
    posted

    Hello Tahir,

    You can get this in the Drop event using the DragEventArgs and the mouse position with the following code:

     

     

     

    var presenter = Infragistics.Windows.Utilities.GetAncestorFromType(e.OriginalSource as DependencyObject, typeof(DataRecordPresenter), true);

     

    I think, this is also covered in the sample with the GetRecordInsertPosition method. You can also take a look at this approach, if you want to have the record over which the mouse is moving during the drag.