<?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 : ReportC&#111;ntrol item with checkbox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : ReportC&#111;ntrol item with checkbox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 22:32:58 +0000</pubDate>
  <lastBuildDate>Mon, 07 Mar 2005 06:00:37 +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=1912</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[ReportC&#111;ntrol item with checkbox : Thanks Sergey, I got it to work...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1912&amp;PID=5583&amp;title=reportcontrol-item-with-checkbox#5583</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1023">Arnie</a><br /><strong>Subject:</strong> 1912<br /><strong>Posted:</strong> 07 March 2005 at 6:00am<br /><br /><P><FONT size=1>Thanks Sergey,</FONT></P><P><FONT size=1>I got it to work with one change to your code.&nbsp; I had to remove SetChecked(!IsChecked()); </FONT></P><P><FONT size=1>Must be because&nbsp;m_bChecked is set by <BR>CXTPReportRecordItem::OnClick :<BR>"m_bChecked = !m_bChecked;"</FONT></P><P><FONT size=1></FONT>&nbsp;</P><P><FONT size=1></FONT>&nbsp;</P><FONT size=2><P></FONT><BR>&nbsp;</P>]]>
   </description>
   <pubDate>Mon, 07 Mar 2005 06:00:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1912&amp;PID=5583&amp;title=reportcontrol-item-with-checkbox#5583</guid>
  </item> 
  <item>
   <title><![CDATA[ReportC&#111;ntrol item with checkbox : Hi Arnie,  Instead of using SetCaption...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1912&amp;PID=5555&amp;title=reportcontrol-item-with-checkbox#5555</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 1912<br /><strong>Posted:</strong> 04 March 2005 at 10:08am<br /><br />Hi Arnie,<br /><br />Instead of using SetCaption you should override GetCaption method inside your class, for example:<br /><br />virtual CString GetCaption()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return IsChecked() ? "Yes":"No";<br />}<br /><br />And inside OnClick method you should only change your internal class state and call control redraw to update the view:<br /><br />virtual void OnClick(XTP_REPORTRECORDITEM_CLICKARGS* pClickArgs)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (...) // any your conditions<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetChecked(!IsChecked());<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pClickArgs-&gt;pControl-&gt;RedrawControl(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPReportRecordItem::OnClick( pClickArgs);<br />}<br /><br />--<br />Best regards,<br />Sergey]]>
   </description>
   <pubDate>Fri, 04 Mar 2005 10:08:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1912&amp;PID=5555&amp;title=reportcontrol-item-with-checkbox#5555</guid>
  </item> 
  <item>
   <title><![CDATA[ReportC&#111;ntrol item with checkbox : Hi, Here is part of a class that...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1912&amp;PID=5552&amp;title=reportcontrol-item-with-checkbox#5552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1023">Arnie</a><br /><strong>Subject:</strong> 1912<br /><strong>Posted:</strong> 04 March 2005 at 8:40am<br /><br /><P>Hi,</P><P>Here is part of a class that i would like to use for&nbsp;records in a report control that displays items with checkboxes:<FONT color=#0000ff size=2><FONT color=#0000ff size=2></P><P>class</FONT><FONT color=#000000 size=2> CRecordPropertyCheck : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2><FONT color=#000000> CXTPReportRecord<BR></FONT>{<BR></FONT><FONT color=#0000ff size=2>protected</FONT><FONT size=2><FONT color=#000000>:<BR></FONT></FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> CMessageRecordItemCheck : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CXTPReportRecordItem<BR>{<BR></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2>:<BR>CMessageRecordItemCheck(BOOL bCheck)<BR>{<BR>&nbsp; HasCheckbox(TRUE);<BR>&nbsp; SetChecked(bCheck);<BR>}<BR></FONT><FONT color=#0000ff size=2><BR>virtual</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> OnClick(XTP_REPORTRECORDITEM_CLICKARGS* pClickArgs)<BR>{<BR>&nbsp; CXTPReportRecordItem::OnClick(pClickArgs);<BR>&nbsp; SetCaption(IsChecked() ? "Yes":"No");<BR>}<BR>...<BR><BR></FONT></FONT><FONT size=2>The caption is not set correctly this way.<BR>Is OnClick the right place to change the caption when the user clicks&nbsp;the checkbox ?</FONT></P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Fri, 04 Mar 2005 08:40:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1912&amp;PID=5552&amp;title=reportcontrol-item-with-checkbox#5552</guid>
  </item> 
 </channel>
</rss>