<?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 : RC as a Grid</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : RC as a Grid]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 02:01:40 +0000</pubDate>
  <lastBuildDate>Mon, 16 Aug 2010 10:59: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=17111</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[RC as a Grid : Working on the Tab behaviour for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17111&amp;PID=59790&amp;title=rc-as-a-grid#59790</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17111<br /><strong>Posted:</strong> 16 August 2010 at 10:59am<br /><br /><DIV>Working on the Tab behaviour for my forms I discovered the <strong>PreviewKeyDown</strong> event. I have to admit it: in&nbsp;about 15 years of VB programming no one gave us&nbsp;such a powerful event. This increases the fire power to the infinite <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0"><img src="http://forum.codejock.com/smileys/smiley32.gif" border="0"><img src="http://forum.codejock.com/smileys/smiley32.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>So I drop down some lines of code I wish to share.</DIV><DIV>&nbsp;</DIV><DIV>In a new form insert (in the order): a textbox, a reportcontrol, a button (reportcontrol is in the middle) and add this code:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>Option Explicit<BR>Private Sub Form_Load()<BR>Dim i As Integer<BR>Dim Record As ReportRecord<BR>Dim Item As ReportRecordItem<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; With Me.ReportControl1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Columns.Add(i, "Column" &amp; i, 100, False)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Editable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 1 To 5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Record = .Records.Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Item = Record.AddItem("")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.CreateEditOptions<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.EditOptions.AddComboButton True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.EditOptions.MaxLength = 10<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.AddItem ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record.AddItem ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowEdit = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FocusSubItems = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SelectionEnable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EditOnClick = True<BR>&nbsp;&nbsp;&nbsp; End With<BR>End Sub<BR>Private Sub ReportControl1_GotFocus()<BR>&nbsp;&nbsp;&nbsp; ReportControl1.FocusSubItems = True<BR>End Sub<BR>Private Sub ReportControl1_PreviewKeyDown(KeyCode As Integer, ByVal Shift As Integer, Cancel As Boolean)<BR>Dim intfc As Integer, intfr As Integer&nbsp; ' focused col / row<BR>Dim rpt As ReportControl<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If KeyCode = Asc(vbTab) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set rpt = ReportControl1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intfc = -1: intfr = -1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Error Resume Next<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intfc = rpt.FocusedColumn.Index<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intfr = rpt.FocusedRow.Index<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Error GoTo 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If intfc &gt; -1 Or intfr &gt; -1 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Shift &gt; 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If intfc &lt;= 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If intfr = 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rpt.FocusS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&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If</DIV><DIV>End Sub</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>There are still two questions to resolve:</DIV><DIV>1) When Shift+Tab from button to ReportControl, the last Row is selected but to edit some row's cell I need to Tab and start from the first column instead of the last (maybe I have to save the RC activecell and restore when enter).</DIV><DIV>2) When Shift+Tab from RC to textbox and I am in row 0, col 0 the inplacebutton remains visible.</DIV><DIV>&nbsp;</DIV><DIV>However its enough for start working with a real project <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0">.</DIV>]]>
   </description>
   <pubDate>Mon, 16 Aug 2010 10:59:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17111&amp;PID=59790&amp;title=rc-as-a-grid#59790</guid>
  </item> 
  <item>
   <title><![CDATA[RC as a Grid :   Albert1 wrote: If I use the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17111&amp;PID=59785&amp;title=rc-as-a-grid#59785</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17111<br /><strong>Posted:</strong> 16 August 2010 at 4:58am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Albert1" alt="Originally posted by Albert1" style="vertical-align: text-bottom;" /> <strong>Albert1 wrote:</strong><br /><br /><DIV>If I use the keyboard I notice that when I reach the last item in the last row the Tab key has no effect.</td></tr></table> </DIV><DIV>&nbsp;</DIV><DIV>I get this why I set:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode">.FocusSubItems = True</pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>No one has similar problems? I guess all people are using RC only to show records with no editing. O am I fully wrong?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>From the reference of a famous grid (not updated anymore in the ActiveX version): </DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> </DIV><DIV><P ="Referenceing"><FONT size=3><strong>TabAction Property</strong></FONT></P><P ="Ms&#111;normal">This property defines the behavior of the <SPAN style="TEXT-TRANS: uppercase">tab</SPAN> key.</P><DIV>Syntax</DIV><P ="Ms&#111;normal"><SPAN ="CharSyntax">wndReportControl</SPAN>.<B>TabAction</B><SPAN ="CharSyntax"> = value</SPAN></P><P ="callout">Values</P><TABLE style="BORDER-COLLAPSE: collapse; MARGIN-LEFT: 23.4pt" border=0 cellSpacing=0 cellPadding=0 ="Ms&#111;normalTable"><T><T><TR><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 155.35pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=207><P ="Table"><SPAN ="CharMenu"><FONT size=2>Design Time</FONT></SPAN></P></TD><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 221.4pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=295><P ="Table"><SPAN ="CharMenu"><FONT size=2>Run Time</FONT></SPAN></P></TD></TR><TR><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 155.35pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=207><P ="Table"><FONT size=2>0 - Control Navigation (default) </FONT></P></TD><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 221.4pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=295><P ="Table"><FONT size=2>dbgControlNavigation</FONT></P></TD></TR><TR><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 155.35pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=207><P ="Table"><FONT size=2>1 - Column Navigation </FONT></P></TD><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 221.4pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=295><P ="Table"><FONT size=2>dbgColumnNavigation</FONT></P></TD></TR><TR><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 155.35pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=207><P ="Table"><FONT size=2>2 - Grid Navigation </FONT></P></TD><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 221.4pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=295><P ="Table"><FONT size=2>dbgGridNavigation</FONT></P></TD></TR><TR><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 155.35pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=207><P ="Table"><FONT size=2>3 - Grid Column Navigation</FONT></P></TD><TD style="PADDING-BOTTOM: 0pt; PADDING-LEFT: 5.4pt; WIDTH: 221.4pt; PADDING-RIGHT: 5.4pt; PADDING-TOP: 0pt" vAlign=top width=295><P ="Table"><FONT size=2>dbgGridColumnNavigation</FONT></P></TD></TR></T></T></TABLE><P ="callout">Remarks</P><P ="Ms&#111;normal">Read/Write at run time and design time. </P><P ="Ms&#111;normal">If set to <EM><B><SPAN style="FONT-STYLE: normal">0 - Control Navigation</SPAN></B></EM> (the default), the <SPAN ="CharMenu"><SPAN style="FONT-WEIGHT: normal; TEXT-TRANS: uppercase">Tab</SPAN></SPAN> key moves to the next or previous control on the form. </P><P ="Ms&#111;normal">If set to <EM><B><SPAN style="FONT-STYLE: normal">1 - Column Navigation</SPAN></B></EM>, the <SPAN ="CharMenu"><SPAN style="FONT-WEIGHT: normal; TEXT-TRANS: uppercase">Tab</SPAN></SPAN> key moves the current cell to the next or previous column. However, if this action would cause the current row to change, then the next or previous control on the form receives focus. </P><P ="Ms&#111;normal">If set to <EM><B><SPAN style="FONT-STYLE: normal">2 - Grid Navigation</SPAN></B></EM>, the <SPAN ="CharMenu"><SPAN style="FONT-WEIGHT: normal; TEXT-TRANS: uppercase">Tab</SPAN></SPAN> key moves the current cell to the next or previous column. The behavior of the <SPAN style="TEXT-TRANS: uppercase">tab</SPAN> key at row boundaries is determined by the WrapCellPointer property. When this setting is used, the tab key never results in movement to another control. </P><P ="Ms&#111;normal">If set to <EM><B><SPAN style="FONT-STYLE: normal">3 - Grid Column Navigation</SPAN></B></EM>, the focus goes to the next control in the <SPAN style="TEXT-TRANS: uppercase">tab</SPAN> order when the <SPAN ="CharMenu"><SPAN style="FONT-WEIGHT: normal; TEXT-TRANS: uppercase">Tab</SPAN></SPAN> key is entered on the last column of the last row.</P><DIV></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>I am talking about a grid created about 15 years ago ...</DIV><DIV>&nbsp;</DIV><DIV>I am trying to reach the &#091;3&#093; behaviour by using in RC:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode">.TrapTabKey = True</pre></td></tr></table></DIV><DIV>however the result is so combersome.</DIV><DIV>&nbsp;</DIV><DIV>Is there a better solution?</DIV><DIV>&nbsp;</DIV><DIV>TY</DIV><DIV>&nbsp;</DIV></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 16 Aug 2010 04:58:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17111&amp;PID=59785&amp;title=rc-as-a-grid#59785</guid>
  </item> 
  <item>
   <title><![CDATA[RC as a Grid : Hello,I am using CJ controls since...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17111&amp;PID=59769&amp;title=rc-as-a-grid#59769</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17111<br /><strong>Posted:</strong> 13 August 2010 at 6:21pm<br /><br /><DIV>Hello,<BR>I am using CJ controls since about 3 years and now I'm trying to use RC a as a grid for data entry (to finally substitute vs**ex and tdb**id). The approach row/item seems good however I encountered some problems (testing RC):</DIV><DIV>&nbsp;</DIV><OL><LI>To have a good interface (i.e.: Access 2007+) I think user should have immediatelly the position of the active cell.&nbsp;MS Access uses an orange border around the active cell. Can we simulate in ReportControl (not&nbsp;simply changing the BG/FG color)?</LI><LI>If the active cell contains a ComboBox and I select something (a costraint value) then the backspace doesnt nothing. The only way to change the value (without selecting other value&nbsp;by opening combo) is to use left arrow+delete key.</LI><LI>In real forms (at least on mines) we could have more than only a single ReportControl. If I use the keyboard I notice that when I reach the last item in the last row the Tab key has no effect. I cannot ask to my customers to use the mouse to navigate to the next control in the form...</LI></OL><DIV>&nbsp;</DIV><DIV>Some hints?</DIV><DIV>TY</DIV><DIV>Alberto</DIV>]]>
   </description>
   <pubDate>Fri, 13 Aug 2010 18:21:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17111&amp;PID=59769&amp;title=rc-as-a-grid#59769</guid>
  </item> 
 </channel>
</rss>