Re:TDBGrid, drag&drop, and row selection
you could use postmessage to simulate clicking on the proper grid row:
procedure TForm1.DBGrid1DragDrop(Sender, Source: TObject; X, Y: Integer);
begin
postmessage(TWinControl(sender).handle,WM_LBUTTONDOWN,MK_LBUTTON,makelong(x,
y));
postmessage(TWinControl(sender).handle,WM_LBUTTONUP,MK_LBUTTON,makelong(x,y)
);
// Real code here
end;
Trevor
Quote
"Lukasz Mularz" <lmul...@nitech.com.pl> wrote in message
news:38300BC8.CEE6057B@nitech.com.pl...> I am trying to edit a row in
TDBGrid (/DataSet), as a result of drag and drop operation. I have no
Quote
> idea how to set focus on 'OnDragDrop' record/row in TDBGrid prior to
editing it. The row is not a
Quote
> current record!!! How to make it current?
> Do you have any idea how to do it?
> LM