3

The user is dragging something over my TcxGrid component. How can I know which row it gets dropped on?

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
Douglas Lise
  • 1,466
  • 1
  • 20
  • 46

2 Answers2

2

Here is an example located on the DevExpress site for a drag and drop inside a cxGrid. I used the same technic to implement a drag and drop between two cxGrids.

How to implement drag-and-drop inside a Grid

evdkraan
  • 171
  • 1
  • 4
  • Thanks, this example solved my problem, the GridRecord is what I looked for: HT := ViewInfo.GetHitTest(X, Y); ReorderRows(TcxGridTableView(GridView), TcxGridRecordCellHitTest(HT).GridRecord); – Douglas Lise Dec 16 '10 at 10:15
1

You Should get some feedback from the drop event or use the Mouse up event then get the grid co-ordinates from the X,Y positions using on one the many Dev express calls. I think, off-hand.

Despatcher
  • 1,745
  • 12
  • 18