<?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 : Columns Expand/Collapse not working</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Columns Expand/Collapse not working]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 04:13:06 +0000</pubDate>
  <lastBuildDate>Mon, 25 Nov 2013 15:19:11 +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=20417</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[Columns Expand/Collapse not working : Sergio -Thanks for the fix. It...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=71954&amp;title=columns-expand-collapse-not-working#71954</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2657">Algae</a><br /><strong>Subject:</strong> 20417<br /><strong>Posted:</strong> 25 November 2013 at 3:19pm<br /><br />Sergio -<br><br>Thanks for the fix. <br><br>It looks cleaner than the CJ material. For V. 16.2.3 I found it unnecessary though.<br><br>A couple things, relevant to 16.2.3:<br><br>1. Shouldn't function be void?<br>2. pColumnExp = GetColumns()-&gt;Find(i); // replace FFind.<br><br>]]>
   </description>
   <pubDate>Mon, 25 Nov 2013 15:19:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=71954&amp;title=columns-expand-collapse-not-working#71954</guid>
  </item> 
  <item>
   <title><![CDATA[Columns Expand/Collapse not working : I&amp;#039;ve just updated my post...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=69400&amp;title=columns-expand-collapse-not-working#69400</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2347">Sergio</a><br /><strong>Subject:</strong> 20417<br /><strong>Posted:</strong> 11 December 2012 at 6:32am<br /><br />I've just updated my post with some fixes...<br><div><br></div>]]>
   </description>
   <pubDate>Tue, 11 Dec 2012 06:32:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=69400&amp;title=columns-expand-collapse-not-working#69400</guid>
  </item> 
  <item>
   <title><![CDATA[Columns Expand/Collapse not working : Please note that FFindColumn(...)...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=69399&amp;title=columns-expand-collapse-not-working#69399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2347">Sergio</a><br /><strong>Subject:</strong> 20417<br /><strong>Posted:</strong> 11 December 2012 at 6:17am<br /><br />Please note that FFindColumn(...) is our method, it find the column by the item index rather than by the column position.<div><br></div><div>Doing so, it works also when the columns are moved!</div><div><br></div><div>Your code doesn't work also when columns aren't moved!</div><div><br></div><div>Regards</div>]]>
   </description>
   <pubDate>Tue, 11 Dec 2012 06:17:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=69399&amp;title=columns-expand-collapse-not-working#69399</guid>
  </item> 
  <item>
   <title><![CDATA[Columns Expand/Collapse not working :   Hello,There is a bug in code,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=69398&amp;title=columns-expand-collapse-not-working#69398</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2347">Sergio</a><br /><strong>Subject:</strong> 20417<br /><strong>Posted:</strong> 11 December 2012 at 6:08am<br /><br />Hello,<div><br></div><div>There is a bug in code, columns expand/collapse doesn't work.</div><div><br></div><div><b><br></b></div><div><b>Your code (Codejock&nbsp;MFC TookKit Pro&nbsp;version 15.2.1):</b></div><div><b><br></b></div><div><div>void CXTPReportColumn::SetExpanded(BOOL bExpanded)</div><div>{</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_bExpanded = bExpanded;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nCnt = m_pColumns-&gt;GetCount();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int iN = GetNextVisualBlock();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int iVs = GetVisibleIndex();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXTPReportColumn* pCol = NULL;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int iC = 0; iC &lt; nCnt; iC++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pCol = m_pColumns-&gt;GetAt(nCnt - iC - 1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pCol)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bExpanded)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int iVc = pCol-&gt;GetVisibleIndex();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (iVc == -1) continue;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (iN &gt; 0 &amp;&amp; iVc &gt; iVs &amp;&amp; iVc &lt;= iVs + iN)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pCol-&gt;SetVisible(FALSE);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (iN &lt; 0 &amp;&amp; iVc &lt; iVs &amp;&amp; iVc &gt;= iVs + iN)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pCol-&gt;SetVisible(FALSE);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int iVc = pCol-&gt;GetOldVisibleIndex();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (iVc == -1) continue;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (iN &gt; 0 &amp;&amp; iVc &gt; iVs &amp;&amp; iVc &lt;= iVs + iN)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pCol-&gt;SetVisible(TRUE);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //else if (iN &lt; 0 &amp;&amp; iVc &lt;= iVs + 1 &amp;&amp; iVc &gt;= iVs + iN)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (iN &lt; 0 &amp;&amp; iVc &lt;= iVs + 2 &amp;&amp; iVc &gt;= iVs + iN)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pCol-&gt;SetVisible(TRUE);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>}</div></div><div><br></div><div><br></div><div><b>My fix:</b></div><div><br></div><div><div>int CMyXTPReportColumn::SetExpanded(BOOL bExpanded)</div><div>{</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Fixes a bug in Codejock version 15.2.1 - CXTPReportColumn::SetExpanded(...)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_bExpanded = bExpanded;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXTPReportControl* pControl = GetControl();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pControl)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nNextVisualBlock = GetNextVisualBlock();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (nNextVisualBlock != 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nItemIndex = GetItemIndex();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nStart;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nEnd;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (nNextVisualBlock &lt; 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nStart = nItemIndex + nNextVisualBlock;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nEnd = nItemIndex;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nStart = nItemIndex + 1;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nEnd = nItemIndex + nNextVisualBlock + 1;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXTPReportColumn* pColumnExp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i=nItemIndex + nNextVisualBlock; i &lt; nItemIndex; i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pColumnExp = pControl-&gt;FFindColumn(i); <font color="#33cc66">// Find column by internal index instead of position</font></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pColumnExp)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pColumnExp-&gt;SetVisible(bExpanded);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pControl-&gt;AdjustLayout();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pControl-&gt;AdjustScrollBars();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>}</div></div><div><br></div><div><br></div><div>Moreover, <u>beware of initial state of expand/collapse</u> that isn't also correctly set. I let you do that fix by yourself.</div><div><br></div><div>Regards</div>]]>
   </description>
   <pubDate>Tue, 11 Dec 2012 06:08:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20417&amp;PID=69398&amp;title=columns-expand-collapse-not-working#69398</guid>
  </item> 
 </channel>
</rss>