<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Release the DrogDrop Event</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Release the DrogDrop Event]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 30 May 2026 02:13:31 +0000</pubDate>
  <lastBuildDate>Fri, 21 Dec 2007 06:54:52 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=8820</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Release the DrogDrop Event : Now its working,thanks Rafael  Eric    ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29699&amp;title=release-the-drogdrop-event#29699</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3600">edderic</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 21 December 2007 at 6:54am<br /><br /><DIV>Now its working,thanks Rafael</DIV><DIV>&nbsp;</DIV><DIV>Eric</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Rafael" alt="Originally posted by Rafael" style="vertical-align: text-bottom;" /> <strong>Rafael wrote:</strong><br /><br /></DIV><DIV>You may first need to begin the drag event from what ever control you are dragging from.&nbsp; Like on most grids, on a DragCell event, you can do a Control.Drag vbBeginDrag. Then, on the calendar control, you capture a drag on the DragDrop event like the following.</DIV><DIV>&nbsp;</DIV><DIV>&lt;code&gt;</DIV><DIV>&nbsp;</DIV><DIV>Private Sub CalendarControl_DragDrop(Source As Control, x As Single, Y As Single)<BR>&nbsp;&nbsp;&nbsp; Dim m_pEditingEvent As CalendarEvent<BR>&nbsp;&nbsp;&nbsp; Dim HitTest As CalendarHitTestInfo<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Test Location of Drop<BR>&nbsp;&nbsp;&nbsp; Set HitTest = CalendarControl.ActiveView.HitTest</DIV><DIV>&nbsp;&nbsp;&nbsp; 'Check drop zone is valid<BR>&nbsp;&nbsp;&nbsp; If CalendarControl.ViewType = xtpCalendarDayView Or CalendarControl.ViewType = xtpCalendarWorkWeekView Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '8193 OR 16385<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If HitTest.HitCode = (xtpCalendarHitTestGroupArea + xtpCalendarHitTestDayViewCell) Or HitTest.HitCode = (xtpCalendarHitTestGroupArea + xtpCalendarHitTestDayViewAllDayEvent) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ok<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ElseIf CalendarControl.ViewType = xtpCalendarMonthView Or CalendarControl.ViewType = xtpCalendarWeekView Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '1 OR 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If HitTest.HitCode = xtpCalendarHitTestGroupArea Or HitTest.HitCode = xtpCalendarHitTestDayHeader Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ok<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; End If</DIV><DIV>&nbsp;&nbsp;&nbsp; 'Create new Event<BR>&nbsp;&nbsp;&nbsp; Set m_pEditingEvent = CalendarControl.DataProvider.CreateEvent<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Get date selection<BR>&nbsp;&nbsp;&nbsp; Dim BeginSelection As Date, EndSelection As Date, AllDay As Boolean, EndTime As Date<BR>&nbsp;&nbsp;&nbsp; CalendarControl.ActiveView.GetSelection BeginSelection, EndSelection, AllDay<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Create Calendar Event<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.StartTime = BeginSelection<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.EndTime = EndSelection<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Subject = "My Subject"<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Location = "My Location"<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.AllDayEvent = AllDay<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Body = "My Body"<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Label = 0<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.BusyStatus = xtpCalendarBusyStatusFree<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.PrivateFlag = 0<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.MeetingFlag = 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Add Event to Calendar<BR>&nbsp;&nbsp;&nbsp; CalendarControl.DataProvider.AddEvent m_pEditingEvent </DIV><DIV>&nbsp;&nbsp;&nbsp; Screen.MousePointer = vbDefault&nbsp;&nbsp;&nbsp; </DIV><DIV>End Sub</DIV><DIV>&nbsp;</DIV><DIV>&lt;/code&gt;</DIV><DIV>&nbsp;</DIV><DIV>You should test the hitcode to know exactly where you are droping and react how you want based on the location. This drop will create an event on the location where you droped.&nbsp;Now, just change the fields to data found the the selected row of your grid or selected text in a control.</DIV></td></tr></table> ]]>
   </description>
   <pubDate>Fri, 21 Dec 2007 06:54:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29699&amp;title=release-the-drogdrop-event#29699</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : it is not working with sharpgrid...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29623&amp;title=release-the-drogdrop-event#29623</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3600">edderic</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 19 December 2007 at 2:45pm<br /><br />it is not working with sharpgrid Oledrag ! <DIV>&nbsp;</DIV><DIV>have you some code from a grid ? (vbbegindrag etc...)</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Wed, 19 Dec 2007 14:45:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29623&amp;title=release-the-drogdrop-event#29623</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : You may first need to begin the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29603&amp;title=release-the-drogdrop-event#29603</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3523">Rafael</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 19 December 2007 at 11:59am<br /><br /><DIV>You may first need to begin the drag event from what ever control you are dragging from.&nbsp; Like on most grids, on a DragCell event, you can do a Control.Drag vbBeginDrag. Then, on the calendar control, you capture a drag on the DragDrop event like the following.</DIV><DIV>&nbsp;</DIV><DIV>&lt;code&gt;</DIV><DIV>&nbsp;</DIV><DIV>Private Sub CalendarControl_DragDrop(Source As Control, x As Single, Y As Single)<BR>&nbsp;&nbsp;&nbsp; Dim m_pEditingEvent As CalendarEvent<BR>&nbsp;&nbsp;&nbsp; Dim HitTest As CalendarHitTestInfo<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Test Location of Drop<BR>&nbsp;&nbsp;&nbsp; Set HitTest = CalendarControl.ActiveView.HitTest</DIV><DIV>&nbsp;&nbsp;&nbsp; 'Check drop zone is valid<BR>&nbsp;&nbsp;&nbsp; If CalendarControl.ViewType = xtpCalendarDayView Or CalendarControl.ViewType = xtpCalendarWorkWeekView Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '8193 OR 16385<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If HitTest.HitCode = (xtpCalendarHitTestGroupArea + xtpCalendarHitTestDayViewCell) Or HitTest.HitCode = (xtpCalendarHitTestGroupArea + xtpCalendarHitTestDayViewAllDayEvent) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ok<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ElseIf CalendarControl.ViewType = xtpCalendarMonthView Or CalendarControl.ViewType = xtpCalendarWeekView Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '1 OR 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If HitTest.HitCode = xtpCalendarHitTestGroupArea Or HitTest.HitCode = xtpCalendarHitTestDayHeader Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ok<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; End If</DIV><DIV>&nbsp;&nbsp;&nbsp; 'Create new Event<BR>&nbsp;&nbsp;&nbsp; Set m_pEditingEvent = CalendarControl.DataProvider.CreateEvent<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Get date selection<BR>&nbsp;&nbsp;&nbsp; Dim BeginSelection As Date, EndSelection As Date, AllDay As Boolean, EndTime As Date<BR>&nbsp;&nbsp;&nbsp; CalendarControl.ActiveView.GetSelection BeginSelection, EndSelection, AllDay<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Create Calendar Event<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.StartTime = BeginSelection<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.EndTime = EndSelection<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Subject = "My Subject"<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Location = "My Location"<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.AllDayEvent = AllDay<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Body = "My Body"<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.Label = 0<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.BusyStatus = xtpCalendarBusyStatusFree<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.PrivateFlag = 0<BR>&nbsp;&nbsp;&nbsp; m_pEditingEvent.MeetingFlag = 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 'Add Event to Calendar<BR>&nbsp;&nbsp;&nbsp; CalendarControl.DataProvider.AddEvent m_pEditingEvent </DIV><DIV>&nbsp;&nbsp;&nbsp; Screen.MousePointer = vbDefault&nbsp;&nbsp;&nbsp; </DIV><DIV>End Sub</DIV><DIV>&nbsp;</DIV><DIV>&lt;/code&gt;</DIV><DIV>&nbsp;</DIV><DIV>You should test the hitcode to know exactly where you are droping and react how you want based on the location. This drop will create an event on the location where you droped.&nbsp;Now, just change the fields to data found the the selected row of your grid or selected text in a control.</DIV>]]>
   </description>
   <pubDate>Wed, 19 Dec 2007 11:59:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29603&amp;title=release-the-drogdrop-event#29603</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : Have you a sample (code) how to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29586&amp;title=release-the-drogdrop-event#29586</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3600">edderic</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 19 December 2007 at 10:03am<br /><br />Have you a sample (code) how to drag and drop from a grid to the calendarcontrol ?<DIV>&nbsp;</DIV><DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Wed, 19 Dec 2007 10:03:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=29586&amp;title=release-the-drogdrop-event#29586</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : You are correct with the EnableDragDrop....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28902&amp;title=release-the-drogdrop-event#28902</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3523">Rafael</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 27 November 2007 at 10:18am<br /><br /><P>You are correct with the EnableDragDrop.&nbsp; I put a CalendarControl on the report control sample that had an example of drag and drop from a list onto a report control.&nbsp; I'm missing somthing, because I could not get the CalendarControl_DragOver event to fire when dragging from the report control onto the CalendarControl.&nbsp; </P><DIV>Put in my own application, I am using a 3rdparty grid and I am able to drag a cell from it onto my CalendarControl no problems.&nbsp; I do not have any properties set to allow this on the Calendar control, so I'm not sure what we are missing right now.&nbsp; I'll test more later.</DIV>]]>
   </description>
   <pubDate>Tue, 27 Nov 2007 10:18:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28902&amp;title=release-the-drogdrop-event#28902</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : Thank you Rafael. The problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28872&amp;title=release-the-drogdrop-event#28872</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2660">McKloony</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 27 November 2007 at 1:29am<br /><br />Thank you Rafael. The problem i have is, that when i try to drag a ReportEntry from the ReportControl into the CalendarControl, the Cursor shows, that it is not possible. I Set:<DIV>&nbsp;</DIV><DIV>XtremeReportControl.ReportControl.EnableDragDrop("Test", xtpReportAllowDragCopy)</DIV><DIV>&nbsp;</DIV><DIV>How can i adjust the CalenderControl to be able onto DropMode?</DIV>]]>
   </description>
   <pubDate>Tue, 27 Nov 2007 01:29:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28872&amp;title=release-the-drogdrop-event#28872</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : If you click and holdon the reportconrtol...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28858&amp;title=release-the-drogdrop-event#28858</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3523">Rafael</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 26 November 2007 at 4:49pm<br /><br /><P>If you click and hold&nbsp;on the reportconrtol then drag over the CalendarControl, the DragOver event will fire, when you let go, the DragDrop will fire.&nbsp; You can catch were you let go using the HitTest.HitCode.&nbsp; Use the xtpCalendarHitTest Enum to compare the hitcode.&nbsp; Then you can create an event using calendarcontrol.dataprovider.createevent and set all the members and properties.</P><DIV>Note:DragDrop can only possibly happen after dragover, and both events only happen when dragging another control over the calendarControl control. You cannot drag the calendar control over itself I think.</DIV>]]>
   </description>
   <pubDate>Mon, 26 Nov 2007 16:49:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28858&amp;title=release-the-drogdrop-event#28858</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : Are you trying to drag an object/control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28857&amp;title=release-the-drogdrop-event#28857</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3523">Rafael</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 26 November 2007 at 4:44pm<br /><br />Are you trying to drag an object/control onto the calendarControl?&nbsp; If so, the DragDrop of the calendarControl handles this.&nbsp; If dragging an event/appointment onto another cell, override the eventchangedex function or the doupdateevent function.<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 26 Nov 2007 16:44:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28857&amp;title=release-the-drogdrop-event#28857</guid>
  </item> 
  <item>
   <title><![CDATA[Release the DrogDrop Event : I want to drag some entrys from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28585&amp;title=release-the-drogdrop-event#28585</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2660">McKloony</a><br /><strong>Subject:</strong> 8820<br /><strong>Posted:</strong> 18 November 2007 at 8:01am<br /><br />I want to drag some entrys from a ReportControl to the CalenadarControl. Does anybody know, how to release the DragDrop Event of the CalenderControl? It is not necessary to drop the real data, the only thing i want to do is, to release teh DragDrop event and to enable the CalenderControl to be able, to receive the DragOver command.]]>
   </description>
   <pubDate>Sun, 18 Nov 2007 08:01:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8820&amp;PID=28585&amp;title=release-the-drogdrop-event#28585</guid>
  </item> 
 </channel>
</rss>