<?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 : Selection and sel change notification bug</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Selection and sel change notification bug]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 05 Jun 2026 07:57:01 +0000</pubDate>
  <lastBuildDate>Tue, 20 Jan 2009 16:50:41 +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=13154</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[Selection and sel change notification bug : excellent, thanks so much! ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44737&amp;title=selection-and-sel-change-notification-bug#44737</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 20 January 2009 at 4:50pm<br /><br />excellent, thanks so much!]]>
   </description>
   <pubDate>Tue, 20 Jan 2009 16:50:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44737&amp;title=selection-and-sel-change-notification-bug#44737</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : Hi, finally I implemented bool...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44697&amp;title=selection-and-sel-change-notification-bug#44697</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 19 January 2009 at 9:42am<br /><br />Hi,<DIV>&nbsp;finally I implemented bool flag <FONT size=2>InitialSelectionEnable to control Populate function - you can call it ONCE and not auto-selection for Populate calls. It exposed to VB also</DIV></FONT>]]>
   </description>
   <pubDate>Mon, 19 Jan 2009 09:42:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44697&amp;title=selection-and-sel-change-notification-bug#44697</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : P.S. Check - how many cases of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44675&amp;title=selection-and-sel-change-notification-bug#44675</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 19 January 2009 at 12:13am<br /><br />P.S. Check - how many cases of Populate() calls you have - you need to modify&nbsp;all with same approach (3 lines instead of 1) <DIV>&nbsp;</DIV><DIV>You can also get rid from Focus </DIV><FONT size=2><P>wndReport.SelectionEnable(FALSE);</P><P>wndReport.Populate();</P><P>wndReport.ShowRowFocus(FALSE);</P><P>wndReport.SelectionEnable(TRUE);</P><DIV></DIV><DIV>and turn it back when you need using call:</DIV><DIV><FONT size=2><P>wndReport.ShowRowFocus(TRUE);</P></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 19 Jan 2009 00:13:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44675&amp;title=selection-and-sel-change-notification-bug#44675</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : I can agree with last sentence...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44674&amp;title=selection-and-sel-change-notification-bug#44674</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 19 January 2009 at 12:11am<br /><br />I can agree with last sentence - this is result of Populate function call. This function check <FONT size=2>IsSelectionEnabled() flag and if TRUE - make selection internally - without notification. If you call<DIV></DIV><FONT size=2><P>wndReport.SelectionEnable(FALSE);</P><P>wndReport.Populate();</P><DIV></DIV><P>wndReport.SelectionEnable(TRUE);</P><DIV>you will have expected behaviour. After this point keyboard steps or mouse click will generate same effect - and will send notification to app. So you can have only one your own function <FONT size=2><P>OnReportSelectionChanged for customization. If it what you want? If so - no need to have mode complicated model I propose you because my idea realized different reaction on keyboard and on mouse! (It have sense in some business model!)</P></FONT></DIV></FONT></FONT>]]>
   </description>
   <pubDate>Mon, 19 Jan 2009 00:11:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44674&amp;title=selection-and-sel-change-notification-bug#44674</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : p.p.s (sorry) failing that if...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44673&amp;title=selection-and-sel-change-notification-bug#44673</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 18 January 2009 at 11:55pm<br /><br />p.p.s (sorry) failing that if the report control must select a row of its own accord, it should notify this.]]>
   </description>
   <pubDate>Sun, 18 Jan 2009 23:55:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44673&amp;title=selection-and-sel-change-notification-bug#44673</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : p.s. I&amp;#039;m not trying to get...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44672&amp;title=selection-and-sel-change-notification-bug#44672</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 18 January 2009 at 11:54pm<br /><br />p.s. I'm not trying to get it to behave differently between keyboard vs mouse user input.<br /><br />I'm trying to get it to stop selecting the row by itself, with NO human input.<br />]]>
   </description>
   <pubDate>Sun, 18 Jan 2009 23:54:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44672&amp;title=selection-and-sel-change-notification-bug#44672</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : My complaint is that the control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44671&amp;title=selection-and-sel-change-notification-bug#44671</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 18 January 2009 at 11:45pm<br /><br />My complaint is that the control selects a row when there was <br /><br />a) no click on the row<br />b) no keyboard input (e.g no keyboard selection)<br /><br />furthermore it selects said row without sending XTP_NM_REPORT_SELCHANGED<br /><br />If going from 0 selected rows to 1 selected row is not a change in selection then I don't know what is.<br /><br />So, I guess we disagree whether this is a bug or not, I remain unconvinced that it is not.<br /><br />I'm not going to go through the dozens of places I use report control to add 3 handlers to "fix" this problem, instead I will more likely have to hack the report control source to have it simply not decide to randomly select rows all by itself. ]]>
   </description>
   <pubDate>Sun, 18 Jan 2009 23:45:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44671&amp;title=selection-and-sel-change-notification-bug#44671</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : I know that it works - I tested...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44669&amp;title=selection-and-sel-change-notification-bug#44669</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 18 January 2009 at 10:44pm<br /><br />I know that it works - I tested it before sending to you. You should consider different situation with the way you react&nbsp;on mouse click - sometims such click means select a word in InPlace editor (normal behaviour of edit control), sometimes you allow to select subitem, sometimes - not. <DIV>Don't expect ReportControl to change existed behaviour - maximum I can do if will be enough client asking about such feature - introduce some binary or enumerated flag - mouse click&nbsp;VS keyboard navigation - select or not&nbsp; (looks like 4 different cases - NO-NO, YES-NO and so on).</DIV><DIV>But not in release 13 for sure.</DIV><DIV>But usually such specific reaction implemented on app level - this is way control is sending notification and app can choose that to do...</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#ff0000>Btw - as I explain you in very begining of our discussion - you use wrong term in this topic title as&nbsp; this is NOT a BUG - this is proper reaction on specific action - Focus vs Selection</FONT>. </DIV>]]>
   </description>
   <pubDate>Sun, 18 Jan 2009 22:44:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44669&amp;title=selection-and-sel-change-notification-bug#44669</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : ok I guess that would work...  or...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44668&amp;title=selection-and-sel-change-notification-bug#44668</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2967">adrien</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 18 January 2009 at 10:32pm<br /><br />ok I guess that would work...<br /><br />or maybe the report control could be fixed?<br /><br />I've got quite a few report controls I'm using that do this...]]>
   </description>
   <pubDate>Sun, 18 Jan 2009 22:32:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44668&amp;title=selection-and-sel-change-notification-bug#44668</guid>
  </item> 
  <item>
   <title><![CDATA[Selection and sel change notification bug : Essentially you should deal on...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44666&amp;title=selection-and-sel-change-notification-bug#44666</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13154<br /><strong>Posted:</strong> 18 January 2009 at 7:32pm<br /><br />Essentially you should deal on app level with 3 events:<FONT size=2> <P>ON_NOTIFY(XTP_NM_REPORT_SELCHANGED, XTP_ID_REPORT_CONTROL, OnReportSelectionChanged)</P><P>ON_NOTIFY(XTP_NM_REPORT_FOCUS_CHANGING, XTP_ID_REPORT_CONTROL, OnReportFocusChanged)</P><P>ON_NOTIFY(XTP_NM_REPORT_LBUTTONDOWN, XTP_ID_REPORT_CONTROL, OnReportLbDown)</P><DIV></DIV><FONT color=#0000ff size=2><P>void</FONT><FONT size=2> CTaskListView::OnReportLbDown(NMHDR* </FONT><FONT color=#008000 size=2>/*pNotifyStruct*/</FONT><FONT size=2>, LRESULT* </FONT><FONT color=#008000 size=2>/*result*/</FONT><FONT size=2>)</P><P>{</P><P>m_bAllowSelect = TRUE;</P><P>}</P></FONT><FONT color=#0000ff size=2><P>void</FONT><FONT size=2> CTaskListView::OnReportFocusChanged(NMHDR* </FONT><FONT color=#008000 size=2>/*pNotifyStruct*/</FONT><FONT size=2>, LRESULT* result)</P><P>{</P><P>CXTPReportSelectedRows* pSelectedRows = GetReportCtrl().GetSelectedRows();</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (pSelectedRows)</P><P>pSelectedRows-&gt;Clear();</P><P>}</P></FONT><FONT color=#0000ff size=2><P>void</FONT><FONT size=2> CTaskListView::OnReportSelectionChanged(NMHDR* </FONT><FONT color=#008000 size=2>/*pNotifyStruct*/</FONT><FONT size=2>, LRESULT* </FONT><FONT color=#008000 size=2>/*result*/</FONT><FONT size=2>)</P><P>{</P><P>CXTPReportSelectedRows* pSelectedRows = GetReportCtrl().GetSelectedRows();</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (pSelectedRows)</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!m_bAllowSelect)</P><P>pSelectedRows-&gt;Clear();</P><P></FONT><FONT color=#0000ff size=2>else</P></FONT><FONT size=2><P>{</P><P>m_bAllowSelect = FALSE;</P><P>pSelectedRows-&gt;Add(GetReportCtrl().GetFocusedRow());</P><P>}</P><P>}</P><P>}</P><DIV></DIV><DIV>and flag </DIV><DIV><FONT size=2>BOOL m_bAllowSelect;</FONT></DIV><DIV>which you should to be FALSE end the end of initialization&nbsp; together with cleaning selection:</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=2><P>int</FONT><FONT size=2> CTaskListView::OnCreate(LPCREATESTRUCT lpCreateStruct)</P><P>{</P></FONT></DIV><DIV>........</DIV><DIV><FONT size=2><DIV>m_bAllowSelect = FALSE;</DIV><P>GetReportCtrl().GetSelectedRows()-&gt;Clear();</P><DIV>}</DIV><DIV></FONT></FONT></FONT>&nbsp;</DIV></DIV>]]>
   </description>
   <pubDate>Sun, 18 Jan 2009 19:32:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13154&amp;PID=44666&amp;title=selection-and-sel-change-notification-bug#44666</guid>
  </item> 
 </channel>
</rss>