Doug Lindauer
Programmer
I have 2 grids connected to 2 tables and I'd like to enable drag and drop between a cell on one grid to the cell on the other but nothing I do seems to make it work. The solutions app shows drag and drop between a listbox and a textbox and I can make that work but not the grid control.
Nothing I've found seems to address this so I've had to make some assumptions. I assume I have to work on the OLEDragDrop method on the textbox in the destination column and the textbox in the source column. So this is where I'm at and it doesn't work. I can make individual textboxes drag and drop but not grid control text boxes.
This is the code I'm using in both places in the grids
It's unclear to me if the oDataObject thing is just the textbox or something more so I just have to assume it's the textbox control or the value in the control.
Nothing I've found seems to address this so I've had to make some assumptions. I assume I have to work on the OLEDragDrop method on the textbox in the destination column and the textbox in the source column. So this is where I'm at and it doesn't work. I can make individual textboxes drag and drop but not grid control text boxes.
This is the code I'm using in both places in the grids
Code:
[tt]grdSOURCE.colSOURCE.txtSOURCE
OLEDragMode = 1 - Automatic
grdDEST.colDEST.txtDEST
OLEDropMode = 1 - enabled
OLEDragMode = 0 - manual
OLEDragDrop code:
lparameters oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord
if oDataObject.Getformat(1) &&CF_TEXT
This.Value = oDataObject.GetData(1)
endif
nodefault
[/tt]
It's unclear to me if the oDataObject thing is just the textbox or something more so I just have to assume it's the textbox control or the value in the control.