<?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 : Cell Clicked</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Cell Clicked]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 02 May 2026 00:11:46 +0000</pubDate>
  <lastBuildDate>Tue, 06 Sep 2005 05:08:05 +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=2842</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[Cell Clicked : Thank You. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2842&amp;PID=8508&amp;title=cell-clicked#8508</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=566">Maui</a><br /><strong>Subject:</strong> 2842<br /><strong>Posted:</strong> 06 September 2005 at 5:08am<br /><br />Thank You.]]>
   </description>
   <pubDate>Tue, 06 Sep 2005 05:08:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2842&amp;PID=8508&amp;title=cell-clicked#8508</guid>
  </item> 
  <item>
   <title><![CDATA[Cell Clicked : You might try using the MouseDown...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2842&amp;PID=8491&amp;title=cell-clicked#8491</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=570">nighthawk</a><br /><strong>Subject:</strong> 2842<br /><strong>Posted:</strong> 04 September 2005 at 4:09pm<br /><br />You might try using the MouseDown event.&nbsp; The following code is from the ReportControl sample project:<br><br><span style="font-family: courier new,courier,mono;">Private Sub wndReportControl_MouseDown(Button As Integer, Shift As Integer, X As Long, Y As Long)</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Dim hitColumn As ReportColumn</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Dim hitRow As ReportRow</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Dim hitItem As ReportRecordItem</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;'The MouseDown event is being used to illustrate how the HitTest methodcan be used.&nbsp; The HitTest method does not have</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;'to be used with a mouse event, it can be used to test any X and Ycoordinate on the screen to see if the ReportControl</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;'occupies these pixes and what part of the ReportControl is at thespecified pixel (Group Box, Row, Item, etc).</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;'If it is dertermined that a ReportControl component is at the X and Ycoordinates, the HitTest method can return a</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'reference to that component (Column, Row, Record, Item, etc...).</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Determines which part of the ReportControl the mouse was positioned over when clicked.</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Select Case wndReportControl.HitTest(X, Y).ht</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'If MouseDown while positioned anywhere over the Group Box (Even overColumn Headers in Group Box)</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpHitTestGroupBox:</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown in Group Box"</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'If MouseDown while positioned anywhere over the ColumnHeaderarea.&nbsp; This does NOT include</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'column header in the Group Box</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpHitTestHeader:</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown in Column Header Area (Not in Group Box)"</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'If MouseDown while positioned over the Report Area, this would includ,rows, columns, items, goup rows, expand buttons</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpHitTestReportArea:</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown in Report Area"</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'This case will never happen, Unknown is returned when HitTest iscalled and the mouse is positioned</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'over an area outside of the report control</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpHitTestUnknown:</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "Mouse is in an Unknown Area"</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; End Select</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Returns a reference to the column cliked</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Determines which column the mouse is positioned over on MouseDown, this will also be executed</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'if the column header in the Group By box is clicked.&nbsp; This will be true if any item in the column</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'is clicked, not just column headers.</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Set hitColumn = wndReportControl.HitTest(X, Y).Column</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; If Not hitColumn Is Nothing Then</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on Column header: " &amp; hitColumn.Caption</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; End If</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Returns a reference to the row clicked</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Determines which row the mouse was positioned over on mousedown.</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Set hitRow = wndReportControl.HitTest(X, Y).Row</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; If Not hitRow Is Nothing Then</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If hitRow.GroupRow Then</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on GroupRow"</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on Row # " &amp; hitRow.Index</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; End If</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Returns a reference to the item clicked</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; 'Determines which row the mouse was positioned over on mousedown.</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; Set hitItem = wndReportControl.HitTest(X, Y).Item</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; If Not hitItem Is Nothing Then</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not wndReportControl.PreviewMode Then</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on Item: "&amp; hitItem.Value &amp; " in column: " &amp; hitColumn.Caption</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ElseIf Not (hitRow.Record.PreviewText = "") Then</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on PreviewText"</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp;&nbsp; End If</span><br style="font-family: courier new,courier,mono;"><span style="font-family: courier new,courier,mono;">End Sub</span><br><br>]]>
   </description>
   <pubDate>Sun, 04 Sep 2005 16:09:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2842&amp;PID=8491&amp;title=cell-clicked#8491</guid>
  </item> 
  <item>
   <title><![CDATA[Cell Clicked : Hi, Sorry if this sounds lazy...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2842&amp;PID=8489&amp;title=cell-clicked#8489</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=566">Maui</a><br /><strong>Subject:</strong> 2842<br /><strong>Posted:</strong> 04 September 2005 at 9:00am<br /><br /><P>Hi,</P><P>Sorry if this sounds lazy of me but I havent used these controls in about 6 months.</P><P>I need to respond to a cell click in the report control but I can't seem to be able to find any events such as RowClicked or CellClicked where I could easily place my code.</P><P>Can anyone help me out with what I am sure is a simple question before I go and waste half a day batteling to find an answer.</P><P>Thank you.</P><P>PS Too bad we dont have a Knowledgebase so that samples like this could be added to it for everyones benifit.</P><span style="font-size:10px"><br /><br />Edited by Maui</span>]]>
   </description>
   <pubDate>Sun, 04 Sep 2005 09:00:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2842&amp;PID=8489&amp;title=cell-clicked#8489</guid>
  </item> 
 </channel>
</rss>