Object Reference > True DBGrid Events > OLEStartDrag Event |
The OLEStartDrag event occurs when a grid control is a source component of a drag/drop operation and its OLEDrag method is called.
TDBGrid_OLEStartDrag (Data As TrueDBGrid80.DataObject, AllowedEffects As Long)
Data is a DataObject object containing formats that the source will provide and possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method.
AllowedEffects is a long integer that should be set by your event handler to indicate which effects the source grid control supports. The target component uses this value to determine the appropriate response to a drop request. The supported effects are represented by the following values, which may be combined with a logical Or operator:
This event enables your application to specify the data formats and drop effects that the source grid will support.
The OLEStartDrag event also occurs if the component's OLEDragMode property is set to 1 - Automatic and a drag/drop operation is initiated by the user. You can use this event to add formats and data to the DataObject object after the component has done so. You can also override the default behavior of the component by clearing the DataObject object (using the Clear method) and then adding new data and formats (using the SetData method).