TcxGrid (DevExpress)

Support forum for our inter-application drag-n-drop components.

TcxGrid (DevExpress)

Postby RichardD » Thu Jun 28, 2018 5:58 pm

After upgrading to DropMaster 2.4.9 and DevExpress 18.1.2 I can no longer drop onto the grid (no code changed on my end).

The TDMTextTarget.AcceptorControl is a DevExpress TcxGrid.

Code: Select all
procedure InitializeDropMasterTarget( AAcceptorControl: TWinControl;
                                      ADMTextTarget: TDMTextTarget );
begin
  // Drag and drop of sale files into the DataLog is handled by the DropMaster
  // (from Raize Software).  We need it's control to be the InnerTreeView. That
  // can't be set in the IDE so we need to take care of it here.
  ADMTextTarget.AcceptorControl := AAcceptorControl;

  ADMTextTarget.AcceptTextFormats := [dtfFiles, dtfCustom, dtfText];

  // Register to accept the custom formats that Outlook supplies.
  // We've also included dtfCustom in AcceptTextFormats at design time.
  with ADMTextTarget.CustomFormats do
  begin
    Add('FileGroupDescriptor');
    AddObject('FileContents', TObject(TYMED_ISTREAM));
    Add(IntToStr(CF_HDROP));    // Needed to accept the drop
    Add('CF_MyCustomFormat'); // I also include our custom format
  end;
end;


Any idea of what I could do to make this work?
RichardD
 
Posts: 7
Joined:
Tue Aug 19, 2014 4:13 pm

Re: TcxGrid (DevExpress)

Postby RichardD » Fri Jun 29, 2018 10:34 am

Answering my own question here in case somebody else experiences this issue.

Not too sure what changed along the versions (DropMaster 2.4.9 and/or DevExpress 18.1.2) but I've been using the TcxGrid as an AcceptorControl for 4 years now, and, for whatever reason, you now need to use the GridView.Site (TcxGridSite) instead.

(i.e. DMTextTarget.AcceptorControl := MyTableView.Site instead of DMTextTarget.AcceptorControl := MycxGrid)

All working again.
Richard
RichardD
 
Posts: 7
Joined:
Tue Aug 19, 2014 4:13 pm


Return to DropMaster

Who is online

Users browsing this forum: No registered users and 0 guests

cron