Replied 8 September 2017, 1:50 pm EST
This KBase article is for a different Grid control. Are you using the FarPoint Spread control? If you are not seeing a control as a drop zone even though you have AllowDrop property set, you need to make sure the DragOver event, which determines what can be dropped on the target, is coded correctly. The DragDrop event performs the actual drop. The DragEnter/Leave events are used by the target to allocate/free any stuff needed to handle the DragOver/Drop events. In the events, the target receives a DragEventArgs object. This object has an AllowedEffect property that indicates what operations are supported by the source. The Effect property indicates what is supported by the target. By default, Effect is None which indicates that the target can not accept the drop. At a minimum, you need to attach to the DragOver and DragDrop events.
spread.DragOver += new DragEventHandler(spread_DragOver);
spread.DragDrop += new DragEventHandler(spread_DragDrop);
In the DragOver event, you need to indicate what operations are supported on the target. In the DragDrop event, you need to process the dropped data. For example, if the target supports a Copy operation of text data then the event handlers might look something like...
private void spread_DragOver(object source, DragEventArgs e)
if ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy)
e.Effect = DragDropEffects.Copy;
private void spread_DragDrop(object source, DragEventArgs e)
string s = e.Data.GetData(DataFormats.Text).ToString();
... // do something with s
You can also look at the following thread for sample draging a row from one Spread to another.