Print Page | Close Window

Drag & Drop event

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5659
Printed Date: 19 September 2024 at 1:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Drag & Drop event
Posted By: Franco Prudente
Subject: Drag & Drop event
Date Posted: 01 December 2006 at 6:41am
Hi,
I don't understand how use the "EnableDragDrop" method.
I want only handle the drop event in the control, but I don't know how do this.
 
Thanks.



Replies:
Posted By: sserge
Date Posted: 01 December 2006 at 4:42pm
Take a look at a regular VB ReportSample application, form frmDragDrop.

Let me simply quote a couple of comments from there:


        'The DragRecords method is used to prepare records to be dropped into the Report Control.
        'DragRecords accepts a ReportRecords collection created by CreateRecords.  Any records that
        'have been prepared using DragRecords will be added to the Report when the items are dropped
        'into the Report Control.  Typically DragRecords would be used in the MouseMove event of the
        'control from which items are being dragged.  The Report Control will automatically add the
        'new records to the report once they have been dropped.
        '
        'Below, the Records collection is filled with a record that corresponds to each item that is
        'currently selected in the List Control.  If the items are dropped into the Report Control, then
        'all records contained in the Records collection will be added to the report.
        '
        'Now Data.GetFormat(cfRecords) will return True as some Records have been added to the clipboard
        wndReport.DragRecords Records



'The DropRecords event occurs when records are dropped into a Report Control, and provides a
'ReportRecords collection containing all of the records that will be dropped into the Report Control.
'This gives the opportunity to modify the ReportRecords collection before they are actually added
'to the Report Control.
Private Sub wndReport_DropRecords(ByVal Records As XtremeReportControl.IReportRecords)
    Debug.Print "Drop Records. Records.Count = " & Records.Count
End Sub


--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net