<?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 : Drag &amp; drop with virtual records</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Drag &amp; drop with virtual records]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 22:53:24 +0000</pubDate>
  <lastBuildDate>Tue, 24 Jan 2023 03:49:38 +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=24352</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[Drag &amp; drop with virtual records : Hi all,What&amp;#039;s the trick handling...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24352&amp;PID=78592&amp;title=drag-drop-with-virtual-records#78592</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1263">Fredrik</a><br /><strong>Subject:</strong> 24352<br /><strong>Posted:</strong> 24 January 2023 at 3:49am<br /><br />Hi all,&nbsp;<br><br>What's the trick handling drag &amp; drop in a grid control having virtual records? I have added response handler for&nbsp;XTP_NM_GRID_BEGINDRAG but since I have virtual records I get the pointer to the same record regardless which one I drag. I could potentially use GetSelectedRows, but thought I should have the information needed in the XTP_NM_GRIDDRAGDROP structure.<br><br>Second question, is it possible to prevent the start of a drag operation when responding to XTP_NM_GRIDDRAGDROP&nbsp;? I have tried setting different values on *pResult and&nbsp;pItemNotify-&gt;bReturnValue.<br><br>Third question: I tried to use XTP_NM_GRID_HASVALIDDROPTYPE message to change dropEffect, however, this is ignored in&nbsp;DROPEFFECT CXTPGridControl::OnDragOver?&nbsp;<br><table width="99%"><tr><td><pre class="BBcode"><br><div><span style="white-space:pre">		</span>XTP_NM_GRIDDRAGDROP nmData;</div><div><span style="white-space:pre">		</span>nmData.dropEffect&nbsp; = dropEffect;</div><div><span style="white-space:pre">		</span>nmData.pDataObject = pDataObject;</div><div><span style="white-space:pre">		</span>nmData.pt<span style="white-space:pre">		</span>&nbsp; &nbsp;= point;</div><div><span style="white-space:pre">		</span>// R-DD &lt;&lt;</div><div><span style="white-space:pre">		</span>nmData.dwKeyState = dwKeyState;</div><div><span style="white-space:pre">		</span>// R-DD &gt;&gt;</div><div><br></div><div><span style="white-space:pre">		</span>int iValid = (int)SendNotifyMessage(XTP_NM_GRID_HASVALIDDROPTYPE, (NMHDR*)&amp;nmData);</div><div><br></div><div><span style="white-space:pre">		</span>m_nOLEDropAbove = nmData.bAbove;</div><div><br></div><div><span style="white-space:pre">		</span>if ((dropEffect != DROPEFFECT_NONE) // &lt;- Shouldn't this be nmData.dropEffect?</div><div><span style="white-space:pre">			</span>&amp;&amp; (!pDataObject || (!pDataObject-&gt;IsDataAvailable(m_cfGrid) &amp;&amp; iValid != 1)))</div><div><span style="white-space:pre">			</span>dropEffect = DROPEFFECT_NONE;<br><br></pre></td></tr></table></div><br>Regards,&nbsp;<br>Fredrik]]>
   </description>
   <pubDate>Tue, 24 Jan 2023 03:49:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24352&amp;PID=78592&amp;title=drag-drop-with-virtual-records#78592</guid>
  </item> 
 </channel>
</rss>