I am having the functionality of Drag and Drop.
Dragging an Item from UltraExplorerBar and dropping on to a UltraGrid. I am able to achieve this functionality by implementing DragDropManager.IDragSource, DragDropManager.IDropTarget interfaces for Drag and drop respectively. I am also using DragDropManager class from Infragistics Samples.
But I am not able to achieve the following functionality –
Thanks,
Madhav
Assuming you have implemented the IDropTarget interface for the UltraGrid, in the OnDropTargetNotify method implementation for the DragOver case, add the following code:
UltraGrid grid = sender as UltraGrid; Point point = grid.PointToClient(Control.MousePosition); UIElement controlElement = grid.DisplayLayout.UIElement; UIElement elementAtPoint = controlElement != null ? controlElement.ElementFromPoint( point ) : null; UltraGridRow rowAtPoint = elementAtPoint != null ? elementAtPoint.GetContext( typeof(UltraGridRow) ) as UltraGridRow; if ( rowAtPoint != null ) { }
This will give you a reference to the row at the current cursor position, if there is one.
Thanks a lot...this works fine.....