怎么得到DBGrid栏拖动事件

解决方案 »

  1.   

    怎么拖动,详细点。
    OnColumnMoved不行吗
      

  2.   

    procedure TForm1.DBGrid1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    begin
        if button=mbLeft then
        begin
            releasecapture;
            sendmessage(dbgrid1.Handle,WM_SYSCOMMAND,SC_MOVE or HTCLIENT,0);
            dbgrid1.Hide ;
            dbgrid1.Show ;
        end;
    end;
      

  3.   

    试试TcxGrid
    http://www.2ccc.com上有的下