<?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 : Suppress SelectionChanged Event</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Suppress SelectionChanged Event]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 19:20:22 +0000</pubDate>
  <lastBuildDate>Thu, 06 Sep 2007 16:34:50 +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=4932</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[Suppress SelectionChanged Event : I too have a need for that event....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=25615&amp;title=suppress-selectionchanged-event#25615</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3276">carson</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 06 September 2007 at 4:34pm<br /><br />I too have a need for that event. Seeing the time of your original post and now, it doesn't look good as a feature request, so, I'll tell you my fix.<DIV></DIV>When presented with these types of problems, I usually try to reach into the Desaware Spyworks ActiveX controls which are invaluable to me. You can do this through VB subclassing, but this example is easier. I simply subclass the Report Control like and do this in the capture event.<DIV>&nbsp;</DIV><DIV>Private Sub SubClass1_WndMessage(hwnd As Long, msg As Long, wp As Long, lp As Long, retval As Long, nodef As Integer)<BR>&nbsp; CONST WM_NOTIFY = &amp;H4E<BR>&nbsp; CONST WM_PARENTNOTIFY = &amp;H210<BR>&nbsp; Select Case msg<BR>&nbsp; Case WM_NOTIFY<BR>&nbsp;&nbsp;&nbsp; if lp = 1568236 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If SubClass1.Tag = "CANCEL" Then</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' This cancels this message<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nodef = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retval = 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SubClass1.Tag = ""<BR>&nbsp;&nbsp;&nbsp; End if<BR>&nbsp; Case WM_PARENTNOTIFY<BR>&nbsp;&nbsp;&nbsp; Dim RptInfo As ReportHitTestInfo<BR>&nbsp;&nbsp;&nbsp; Set RptInfo = wndReportControl.HitTest(LowWord(lp), HighWord(lp))<BR>&nbsp;&nbsp;&nbsp; If RptInfo.ht = xtpHitTestReportArea Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SubClass1.Tag = ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'If Conditions are met then SubClass1.Tag = "CANCEL"<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp; End Select<BR>End Sub</DIV><DIV>Function HighWord%(DWord&amp;)<BR>&nbsp; HighWord% = (DWord And &amp;HFFFF0000) \ &amp;H10000<BR>End Function</DIV><DIV>Function LowWord%(DWord&amp;)<BR>&nbsp; If DWord And &amp;H8000&amp; Then ' &amp;H8000&amp; = &amp;H00008000<BR>&nbsp;&nbsp;&nbsp; LowWord% = DWord Or &amp;HFFFF0000<BR>&nbsp; Else<BR>&nbsp;&nbsp;&nbsp; LowWord% = DWord And &amp;HFFFF&amp;<BR>&nbsp; End If<BR>End Function</DIV>]]>
   </description>
   <pubDate>Thu, 06 Sep 2007 16:34:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=25615&amp;title=suppress-selectionchanged-event#25615</guid>
  </item> 
  <item>
   <title><![CDATA[Suppress SelectionChanged Event : i have noticed the new SelectionChanging...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=20173&amp;title=suppress-selectionchanged-event#20173</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2294">haraldradi</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 08 February 2007 at 2:44am<br /><br />i have noticed the new SelectionChanging event on the shortcut bar, the same thing for the report control would be fine.]]>
   </description>
   <pubDate>Thu, 08 Feb 2007 02:44:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=20173&amp;title=suppress-selectionchanged-event#20173</guid>
  </item> 
  <item>
   <title><![CDATA[Suppress SelectionChanged Event : any news on that?  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=20165&amp;title=suppress-selectionchanged-event#20165</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2294">haraldradi</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 07 February 2007 at 5:26pm<br /><br />any news on that?]]>
   </description>
   <pubDate>Wed, 07 Feb 2007 17:26:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=20165&amp;title=suppress-selectionchanged-event#20165</guid>
  </item> 
  <item>
   <title><![CDATA[Suppress SelectionChanged Event : Ok, agree with you that adding...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15407&amp;title=suppress-selectionchanged-event#15407</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 01 September 2006 at 6:59am<br /><br />Ok, agree with you that adding SelectionChanging event would work much better for you. I'll consider this post as a feature request.<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Fri, 01 Sep 2006 06:59:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15407&amp;title=suppress-selectionchanged-event#15407</guid>
  </item> 
  <item>
   <title><![CDATA[Suppress SelectionChanged Event : Your recommendation is not really...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15399&amp;title=suppress-selectionchanged-event#15399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2294">haraldradi</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 01 September 2006 at 2:04am<br /><br />Your recommendation is not really feasible as the SelectionChanged event is fired _after_ selecting the new and modifying the SelectedRows collection inside the event handler would fire yet another SelectionChanged event recursively.<br>So your solution would imply adding some ugly code to prevent this recursive SelectionChanged firing - which i could live with - but also produces a flickering selection in the report control.<br><br>I'd prefer to see an additional BeforeSelectionChanged or SelectionChanging event which can be trapped to control the selection behaviour of the report control.<br><br>regards,<br>harald<br><br>(PS: does it make any difference if i file this as a feature request?)<br>]]>
   </description>
   <pubDate>Fri, 01 Sep 2006 02:04:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15399&amp;title=suppress-selectionchanged-event#15399</guid>
  </item> 
  <item>
   <title><![CDATA[Suppress SelectionChanged Event : Hi,Unfortunately, no recommended...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15366&amp;title=suppress-selectionchanged-event#15366</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 31 August 2006 at 9:21am<br /><br />Hi,<br><br>Unfortunately, no recommended way because SelectionChanged event just&nbsp; notifies user about upcoming selection change. <br><br>For now I can only recommend having a custom selected rows collection (mark items, for example, by adding a special invisible boolean field to your Record object). Then ask your alert on SelectionChanged event, if necessary use wndReportControl.SelectedRows.DeleteAll and add your items into SelectedRows collection... (one more hint - you can find a Row by Record using .Rows.FindRow method)<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Thu, 31 Aug 2006 09:21:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15366&amp;title=suppress-selectionchanged-event#15366</guid>
  </item> 
  <item>
   <title><![CDATA[Suppress SelectionChanged Event : What is the recommended way to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15353&amp;title=suppress-selectionchanged-event#15353</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2294">haraldradi</a><br /><strong>Subject:</strong> 4932<br /><strong>Posted:</strong> 31 August 2006 at 5:40am<br /><br />What is the recommended way to intercept a selection change and suppress the SelectionChanged Event?<br>I want some kind of "All changes will be lost - Proceed?" alert box which forces the selection to stay unmodified if canceled.]]>
   </description>
   <pubDate>Thu, 31 Aug 2006 05:40:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4932&amp;PID=15353&amp;title=suppress-selectionchanged-event#15353</guid>
  </item> 
 </channel>
</rss>