<?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 : Read only item with button</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Read only item with button]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 03:29:39 +0000</pubDate>
  <lastBuildDate>Thu, 08 Jul 2010 04:36:54 +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=16914</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[Read only item with button : Hi Aaron.   The report control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59253&amp;title=read-only-item-with-button#59253</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 16914<br /><strong>Posted:</strong> 08 July 2010 at 4:36am<br /><br /><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>Hi Aaron. <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>The report control is a beast so say the least, really great control, but it's sometimes hard to work with ( My fault)<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>While I was struggling with this posts problem I tried a different way to solve it.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>I would store the column that was clicked in the RequestEdit event <o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>lngSelectedCol = Column.Index<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>Then in the PreviewKeyDown event set KeyCode = 0 if the column matched the column I wanted to disable typing.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN><BR>If lngSelectedCol = W_RESPONSIBILITY Then<BR>&nbsp;&nbsp;&nbsp; KeyCode = 0<BR>End If<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>This worked just great until I showed a modal form when clicking the button.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>When the code returns, from the closure of the modal form, the report control PreviewKeyDown does not work anymore.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>I tried to create a demo of this problem but can't replicate it outside of my main app.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>The report control in on a form which is then part of a docking pane.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>But never mind as its solved another way now.<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>All the best<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>&nbsp;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB" lang=EN>Mark<o:p></o:p></SPAN></P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 08 Jul 2010 04:36:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59253&amp;title=read-only-item-with-button#59253</guid>
  </item> 
  <item>
   <title><![CDATA[Read only item with button : Hi Mark,  Glad it helped you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59247&amp;title=read-only-item-with-button#59247</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16914<br /><strong>Posted:</strong> 07 July 2010 at 10:06am<br /><br />Hi Mark,<DIV>&nbsp;</DIV><DIV>Glad it helped you <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>I find it strange though why the other "buttons" can't be set like the ItemControl. Same buttons and same EditOptions but different behaviour...</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 07 Jul 2010 10:06:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59247&amp;title=read-only-item-with-button#59247</guid>
  </item> 
  <item>
   <title><![CDATA[Read only item with button : Thanks very muchAaron. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59242&amp;title=read-only-item-with-button#59242</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 16914<br /><strong>Posted:</strong> 07 July 2010 at 3:42am<br /><br />Thanks very much&nbsp;Aaron.]]>
   </description>
   <pubDate>Wed, 07 Jul 2010 03:42:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59242&amp;title=read-only-item-with-button#59242</guid>
  </item> 
  <item>
   <title><![CDATA[Read only item with button : Hi Mark,   It isn&amp;#039;t possible...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59229&amp;title=read-only-item-with-button#59229</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16914<br /><strong>Posted:</strong> 06 July 2010 at 7:41am<br /><br />Hi Mark,<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>It isn't possible with ExpandButton, Combo and Spin controls. You could add an ItemControl instead... </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Me.ReportControl1.AllowEdit = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; With Me.ReportControl1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add 0, "Column 1", 100, True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To 5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .AddItem(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .ItemControls.AddButton(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Alignment = xtpReportItemControlRight<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Enable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Caption = "..."&nbsp; 'Simulate ExpandButton <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SetSize 16, 16<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Themed = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<BR>&nbsp;&nbsp;&nbsp; End With</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 07:41:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59229&amp;title=read-only-item-with-button#59229</guid>
  </item> 
  <item>
   <title><![CDATA[Read only item with button : I have a Column with a button. But...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59226&amp;title=read-only-item-with-button#59226</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 16914<br /><strong>Posted:</strong> 06 July 2010 at 2:56am<br /><br /><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3 face="Times New Roman">I have a Column with a button.</FONT></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3 face="Times New Roman">But I would like to make the cell read only. </FONT></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3 face="Times New Roman">If I set Column.Editable = False the button disappears as well.</FONT></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">&nbsp;</FONT></FONT><O:P></O:P></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">Set Column = wndTasks.Columns.add(2, "Responsibility", 200, True)<O:P></O:P></FONT></FONT></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">Column.Visible = True<O:P></O:P></FONT></FONT></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">Column.Editable = False<O:P></O:P></FONT></FONT></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">Column.EditOptions.AddExpandButton<O:P></O:P></FONT></FONT></P><SPAN style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; mso-ansi-: EN-GB; mso-fareast-font-family: 'Times New Roman'; mso-fareast-: EN-US; mso-bidi-: AR-SA">Column.EditOptions.GetInplaceButton(0).InsideCellButton = True <DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><P>I did try this code;</P><DIV>Set Item = rRecord.AddItem("")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.CreateEditOptions<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.EditOptions.AddExpandButton<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.EditOptions.AllowEdit = False</DIV><DIV>&nbsp;</DIV><DIV>Which did sort of give me what I wanted, but the InplaceButtonDown events fires as soon as I click the cell, rather than the button.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;if I set Item.EditOptions.ConstraintEdit = True this still allows me to type into the cell but at least it ignores, and clears the type when you click away.</DIV><DIV>But still not the best.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV></DIV><DIV>Thanks</DIV></SPAN>]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 02:56:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16914&amp;PID=59226&amp;title=read-only-item-with-button#59226</guid>
  </item> 
 </channel>
</rss>