<?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 : &quot;Sticky&quot; (multiple) selection</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : &quot;Sticky&quot; (multiple) selection]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 14:28:51 +0000</pubDate>
  <lastBuildDate>Wed, 10 Dec 2008 10:30:13 +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=12832</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[&quot;Sticky&quot; (multiple) selection : Glad to help, Marco!  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43519&amp;title=sticky-multiple-selection#43519</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 10 December 2008 at 10:30am<br /><br />Glad to help, Marco!]]>
   </description>
   <pubDate>Wed, 10 Dec 2008 10:30:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43519&amp;title=sticky-multiple-selection#43519</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : Wow!! Thanks, jbpro: this actually...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43511&amp;title=sticky-multiple-selection#43511</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2116">MNovaro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 10 December 2008 at 5:07am<br /><br />Wow!! <br><br>Thanks, jbpro: this actually works as I expected!! <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" align="absmiddle"><br><br>Thank you really very much for the help<br>Marco<br>]]>
   </description>
   <pubDate>Wed, 10 Dec 2008 05:07:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43511&amp;title=sticky-multiple-selection#43511</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : Hi MNovaro,Sorry, I didn&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43408&amp;title=sticky-multiple-selection#43408</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 03 December 2008 at 7:59pm<br /><br />Hi MNovaro,<br><br>Sorry, I didn't know that event wasn't available in 11.2.1. Also, sorry for taking a while to get back, I've been busy with work and a new baby girl!<br><br>Anyway, I think I have found a solution for you. Assuming you have the MouseDown and MouseUp events, this should work:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private mo_SelectedRows As Collection<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; ' Save the starting selection (usually the first row only).<br>&nbsp;&nbsp; ' If your code selects other rows at startup programmatically, <br>&nbsp;&nbsp; ' then call RememberSelection after you have made the selection in code<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; RememberSelection&nbsp;&nbsp; ' Call this after you have populated your ReportControl and if you change the selection programmatically<br>End Sub<br><br>Private Sub ReportControl1_MouseDown(Button As Integer, Shift As Integer, x As Long, y As Long)<br>&nbsp;&nbsp; Dim lo_Hit As ReportHitTestInfo<br>&nbsp;&nbsp; Dim lo_Row As ReportRow<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Determine if the mouse is over a selectable row<br>&nbsp;&nbsp; Set lo_Hit = Me.ReportControl1.HitTest(x, y)<br>&nbsp;&nbsp; If Not lo_Hit Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not lo_Hit.Row Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' The mouse is over a selectable row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Restore the previous selection since the MouseDown will<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' reset the selection to a single (hovered over) item<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RestoreSelection<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Check to see if the current row was selected last time<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' we saved the selection. If it was selected, then we<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' should de-select it this click<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each lo_Row In mo_SelectedRows<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If lo_Row Is lo_Hit.Row Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Row was previously selected, so de-select it<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lo_Hit.Row.Selected = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next lo_Row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Save the current selection state<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RememberSelection<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp; End If<br>End Sub<br><br>Private Sub ReportControl1_MouseUp(Button As Integer, Shift As Integer, x As Long, y As Long)<br>&nbsp;&nbsp; ' Mouse-up will reset the selection, so we should restore our previous selection if required<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Dim lo_Hit As ReportHitTestInfo<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ' Determine if mouse is over a selectable row<br>&nbsp;&nbsp; Set lo_Hit = Me.ReportControl1.HitTest(x, y)<br>&nbsp;&nbsp; If Not lo_Hit Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not lo_Hit.Row Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' We are over a row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Remove the currently selected item<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.ReportControl1.SelectedRows.DeleteAll<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Restore the saved selection from MouseDown<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RestoreSelection<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp; End If<br>End Sub<br><br>Private Sub RememberSelection()<br>&nbsp;&nbsp; ' Save the current state of selected rows<br>&nbsp;&nbsp; Dim lo_Row As ReportRow<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set mo_SelectedRows = New Collection<br>&nbsp;&nbsp; For Each lo_Row In Me.ReportControl1.SelectedRows<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mo_SelectedRows.Add lo_Row<br>&nbsp;&nbsp; Next lo_Row<br>End Sub<br><br>Private Sub RestoreSelection()<br>&nbsp;&nbsp; ' Restore the selection state saved in RememberSelection()<br>&nbsp;&nbsp; Dim lo_Row As ReportRow<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; For Each lo_Row In mo_SelectedRows<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lo_Row.Selected = True<br>&nbsp;&nbsp; Next lo_Row<br>End Sub<br></pre></td></tr></table><br><br><br>If you don't have these events, then the best I can suggest is to buy the upgrade ;)<br><br><br>]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 19:59:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43408&amp;title=sticky-multiple-selection#43408</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : Ehm... I neither have a &amp;#034;FocusChanging&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43382&amp;title=sticky-multiple-selection#43382</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2116">MNovaro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 03 December 2008 at 4:11am<br /><br />Ehm... I neither have a "FocusChanging" event in my version... <img src="http://forum.codejock.com/smileys/smiley19.gif" border="0" align="absmiddle"><br>]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 04:11:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43382&amp;title=sticky-multiple-selection#43382</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : Hello, jbprothanks for your help:...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43369&amp;title=sticky-multiple-selection#43369</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2116">MNovaro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 02 December 2008 at 12:06pm<br /><br />Hello, jbpro<br><br>thanks for your help: I can't test your solution in here, but I will do asap and I'll let you know.... <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="absmiddle"><br>]]>
   </description>
   <pubDate>Tue, 02 Dec 2008 12:06:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43369&amp;title=sticky-multiple-selection#43369</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : I just noticed another problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43368&amp;title=sticky-multiple-selection#43368</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 02 December 2008 at 12:00pm<br /><br />I just noticed another problem with the above approach - If you click the currently focused row when there are multiple rows selected, the selection will be reset to the just the single focused row. This is because the FocusChanging event doesn't fire (since the focus isn't changing) and we can't cancel the default behaviour. Unfortunately, there is no corresponding SelectionChanging event that would allow us to cancel any selection change. I'll see if I can figure out a workaround.<br>]]>
   </description>
   <pubDate>Tue, 02 Dec 2008 12:00:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43368&amp;title=sticky-multiple-selection#43368</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : You could do this: Private Sub...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43366&amp;title=sticky-multiple-selection#43366</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 02 December 2008 at 11:28am<br /><br />You could do this:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub ReportControl1_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)<br>&nbsp;&nbsp; Cancel = True<br>&nbsp;&nbsp; NewRow.Selected = Not NewRow.Selected<br>End Sub<br></pre></td></tr></table><br><br>The only problem being that the focus (dotted rectangle) doesn't move to the most recently clicked row. Unfortunately, all of my attempts to move the focus also reset the selection to a single item. This may or may not be a problem for you though.<br><br>]]>
   </description>
   <pubDate>Tue, 02 Dec 2008 11:28:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43366&amp;title=sticky-multiple-selection#43366</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : I guess I have no &amp;#034;MultiSelectMode&amp;#034;,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43354&amp;title=sticky-multiple-selection#43354</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2116">MNovaro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 02 December 2008 at 3:02am<br /><br /><img src="http://forum.codejock.com/smileys/smiley19.gif" border="0" align="absmiddle"> I guess I have no "MultiSelectMode", since I'm still using the 11.2.1 release....<br>Is there a way to "simulate" this with code?<br><br>Thanks again<br>Marco<br>]]>
   </description>
   <pubDate>Tue, 02 Dec 2008 03:02:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43354&amp;title=sticky-multiple-selection#43354</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : Set the MultiSelectMode property...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43324&amp;title=sticky-multiple-selection#43324</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 01 December 2008 at 9:32am<br /><br />Set the MultiSelectMode property to True.]]>
   </description>
   <pubDate>Mon, 01 Dec 2008 09:32:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43324&amp;title=sticky-multiple-selection#43324</guid>
  </item> 
  <item>
   <title><![CDATA[&quot;Sticky&quot; (multiple) selection : Hello, everybodyI would like to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43319&amp;title=sticky-multiple-selection#43319</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2116">MNovaro</a><br /><strong>Subject:</strong> 12832<br /><strong>Posted:</strong> 01 December 2008 at 8:54am<br /><br />Hello, everybody<br><br>I would like to use a Report Control with a "Sticky" selection, that is: selecting multiple items without having to press CTRL (or Shift).<br>In other words: I would like to select a row on click event if it is not selected, and unselect it if it is selected.<br><br>Is this possible?? <img src="http://forum.codejock.com/smileys/smiley5.gif" border="0" align="absmiddle"><br><br>Thanks in advance for any help<br>Regards<br>Marco<br>]]>
   </description>
   <pubDate>Mon, 01 Dec 2008 08:54:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12832&amp;PID=43319&amp;title=sticky-multiple-selection#43319</guid>
  </item> 
 </channel>
</rss>