<?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 : SOLVED:HitTest</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : SOLVED:HitTest]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 02:01:22 +0000</pubDate>
  <lastBuildDate>Tue, 21 Sep 2010 10:13:01 +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=17282</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[SOLVED:HitTest : thanks... another problem solved! ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60376&amp;title=solvedhittest#60376</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5940">JamGodz</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 21 September 2010 at 10:13am<br /><br />thanks... another problem solved!]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 10:13:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60376&amp;title=solvedhittest#60376</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED:HitTest : Hi,  Something like:  Private...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60370&amp;title=solvedhittest#60370</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 21 September 2010 at 8:41am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Something like:</DIV><DIV>&nbsp;</DIV><DIV>Private Sub wndReportControl_MouseDown(Button As Integer, Shift As Integer, x As Long, y As Long)<BR></DIV><DIV>Dim hitRow As XtremeReportControl.ReportRow<BR>Dim hitColumn As XtremeReportControl.ReportColumn</DIV><DIV>&nbsp;</DIV><DIV>On Error GoTo myerror<BR></DIV><DIV>&nbsp;&nbsp;&nbsp; Set hitRow = wndReportControl.HitTest(x, y).Row<BR>&nbsp;&nbsp;&nbsp; Set hitColumn = wndReportControl.HitTest(x, y).Column<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; rs.AbsolutePosition = hitRow.Index<BR>&nbsp;&nbsp;&nbsp; rs.Move 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Not hitRow Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on Item: " &amp; rs.Fields(hitColumn.ItemIndex).Value<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <BR>myerror:<BR>If Err.Number &gt; 0 Then<BR>&nbsp;&nbsp;&nbsp; 'do something with it !!!<BR>End If</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>You will get value&nbsp;of selected "cell" from the recordset itself.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 08:41:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60370&amp;title=solvedhittest#60370</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED:HitTest : Hi Aaron!   Im using the code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60364&amp;title=solvedhittest#60364</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5940">JamGodz</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 21 September 2010 at 8:08am<br /><br />Hi Aaron! <br><br>Im using the code below to retrieve data in database...:<br><br>Private Const COLUMN_APHC = 0<br>Private Const COLUMN_PLTRNAME = 1<br>Private Const COLUMN_HDANAME = 2<br>Private Const COLUMN_LKG = 3<br>Private Const COLUMN_NETCANE = 4<br>Private Const COLUMN_ESTIMATED = 5<br>Private Const COLUMN_PROGRESS = 6<br>Private Const COLUMN_ICON_STATUS = 7<br><br>Dim sSplit As Variant<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; sSplit = Array("APHCODE", "PLTR_NAME", "HDA_NAME", "T_LKG", "T_NET_CANE", "ESTIMATED", "PROGRESS")<br>&nbsp;&nbsp;&nbsp; rs.Open SQLParser.SQLStatement, ConnectTo.InternalConn, adOpenStatic, adLockOptimistic<br>&nbsp;&nbsp;&nbsp; CustomizeRepCtrl<br>&nbsp;&nbsp;&nbsp; If rs.RecordCount &gt; 0 Then&nbsp; rs.MoveFirst<br>&nbsp;&nbsp;&nbsp; With wndList<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SetVirtualMode rs.RecordCount<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Redraw<br>&nbsp;&nbsp;&nbsp; End With<br>End Sub<br>Private Sub wndList_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)<br><br>&nbsp;&nbsp;&nbsp; If Row.Index &lt; rs.RecordCount Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rs.AbsolutePosition = Row.Index + 1: rs.Move 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case Item.Index<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case COLUMN_APHC, COLUMN_PLTRNAME, COLUMN_HDANAME, COLUMN_LKG,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metrics.Text = rs.Fields(sSplit(Item.Index)).Value &amp; ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select<br>&nbsp;&nbsp;&nbsp; End If<br>End Sub<br>Private Sub CustomizeRepCtrl()<br>&nbsp;&nbsp;&nbsp; Dim Column As ReportColumn<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_ICON_STATUS, "ICONSTATUS", 18, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Icon = COLUMN_BLACK_ICON<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_APHC, "APHCODE", 100, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = False<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_PLTRNAME, "Planter Name", 400, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = False<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_HDANAME, "HDA Name", 200, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = False<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_LKG, "LKG", 70, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = False<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_NETCANE, "NET CANE", 70, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = False<br>&nbsp;&nbsp;&nbsp; Set Column = wndList.Columns.Add(COLUMN_ESTIMATED, "EST. NET CANE", 100, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.Editable = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Column.EditOptions.SelectTextOnEdit = True<br>&nbsp;&nbsp;&nbsp; With wndList&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.ColumnStyle = xtpColumnOffice2007<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EnableMarkup = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.DrawGridForEmptySpace = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.VerticalGridStyle = xtpGridSmallDots<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.HorizontalGridStyle = xtpGridSmallDots<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SetCustomDraw xtpCustomBeforeDrawRow<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SetVirtualMode 0<br>&nbsp;&nbsp;&nbsp; End With<br>End Sub<br><br>Private Sub wndList_BeginEdit(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem)<br>&nbsp;&nbsp;&nbsp; Dim i As Integer<br>&nbsp;&nbsp;&nbsp; rs.AbsolutePosition = (Row.Index + 1): rs.Move 0<br>&nbsp;&nbsp;&nbsp; For i = 0 To UBound(sSplit())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReDim Preserve strItemVal(0 To i)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strItemVal(i) = rs.Fields(sSplit(i)).Value &amp; ""<br>&nbsp;&nbsp;&nbsp; Next i<br>End Sub<br><br>Please let me know if have mistaken something... thanks<br>]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 08:08:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60364&amp;title=solvedhittest#60364</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED:HitTest :   JamGodz wrote:Hi SuperMario!...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60338&amp;title=solvedhittest#60338</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 21 September 2010 at 3:57am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by JamGodz" alt="Originally posted by JamGodz" style="vertical-align: text-bottom;" /> <strong>JamGodz wrote:</strong><br /><br />Hi SuperMario! Good Day!<BR><BR>thanks you for your reply... is there any other way to get the hitTest in VM? or any workaround?<BR>please...<BR><BR>thanks?<BR><BR><BR></td></tr></table> <DIV>&nbsp;</DIV><DIV>Hi,</DIV><DIV>&nbsp;</DIV><DIV>How do you show data in ReportControl Virtualmode? I guess you have somekind of array, right?&nbsp;If you have an array you are able to retrieve the data by accessing the array:</DIV><DIV>&nbsp;</DIV><DIV>Dim hitRow As XtremeReportControl.ReportRow<BR>Dim hitColumn As XtremeReportControl.ReportColumn</DIV><DIV>&nbsp;</DIV><DIV>Set hitRow = wndReportControl.HitTest(x, y).Row</DIV><DIV>Set hitColumn = wndReportControl.HitTest(x, y).Column</DIV><DIV><BR>&nbsp;&nbsp;&nbsp; If Not hitColumn Is Nothing and not HitRow is nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on Item: " &amp; myArray(hitColumn.ItemIndex, hitRow.Index)<BR>&nbsp;&nbsp;&nbsp;&nbsp;End If</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>If this doesn't help please&nbsp;upload sample project and add some info to what you need <img src="http://forum.codejock.com/smileys/smiley2.gif" height="17" width="17" border="0" alt="Wink" title="Wink" /></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><strong>To SuperMario</strong>: Would it be possible to return Item.Caption as well? HitTest is already returning ReportItem.Index or do you calculate index on the fly?</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 03:57:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60338&amp;title=solvedhittest#60338</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED:HitTest : Hi SuperMario! Good Day!  thanks...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60329&amp;title=solvedhittest#60329</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5940">JamGodz</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 20 September 2010 at 8:51pm<br /><br />Hi SuperMario! Good Day!<br><br>thanks you for your reply... is there any other way to get the hitTest in VM? or any workaround?<br>please...<br><br>thanks?<br><br><br>]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 20:51:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60329&amp;title=solvedhittest#60329</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED:HitTest : In VM rows don&amp;#039;t really have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60326&amp;title=solvedhittest#60326</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 20 September 2010 at 3:59pm<br /><br />In VM rows don't really have data, the data is drawn in using the BeforeDrawRow event.&nbsp; So you would need to use the column\row indexes to calculate which data this is.]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 15:59:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60326&amp;title=solvedhittest#60326</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED:HitTest :  Hi Everyone! or Aaronwhy is...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60313&amp;title=solvedhittest#60313</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5940">JamGodz</a><br /><strong>Subject:</strong> 17282<br /><strong>Posted:</strong> 19 September 2010 at 7:52pm<br /><br />Hi Everyone! or Aaron<br><br>why is it the hitItem in VirtualMode doesn't display a value/caption.<br><br>Dim hitItem As ReportRecordItem<br>&nbsp;&nbsp;&nbsp; 'Returns a reference to the item clicked<br>&nbsp;&nbsp;&nbsp; 'Determines which row the mouse was positioned over on mousedown.<br>&nbsp;&nbsp;&nbsp; Set hitItem = wndReportControl.HitTest(X, Y).Item<br>&nbsp;&nbsp;&nbsp; If Not hitItem Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not wndReportControl.PreviewMode Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on Item: " &amp; <font color="#ff0000">hitItem.Value</font> &amp; " in column: " &amp; hitColumn.Caption<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ElseIf Not (hitRow.Record.PreviewText = "") Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "MouseDown on PreviewText"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; End If<br><br>]]>
   </description>
   <pubDate>Sun, 19 Sep 2010 19:52:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17282&amp;PID=60313&amp;title=solvedhittest#60313</guid>
  </item> 
 </channel>
</rss>