<?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 : Adding a row to a collapsed CXTPReportControl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Adding a row to a collapsed CXTPReportControl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 05:58:29 +0000</pubDate>
  <lastBuildDate>Thu, 19 May 2011 09:10:40 +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=16689</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[Adding a row to a collapsed CXTPReportControl : Hi,currently Populate() does not...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=64488&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#64488</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 19 May 2011 at 9:10am<br /><br />Hi,<br><br>currently Populate() does not keep the current expand state. All rows are destroyed and the recreated. I look into a solution for the next release.<br><br>Andre<br><br>]]>
   </description>
   <pubDate>Thu, 19 May 2011 09:10:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=64488&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#64488</guid>
  </item> 
  <item>
   <title><![CDATA[Adding a row to a collapsed CXTPReportControl : My solution, if you can call it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=64426&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#64426</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6060">acwest</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 17 May 2011 at 4:32pm<br /><br />My solution, if you can call it that, was to subclass the report control, and in my populate, get a list of all collapsed rows, then recollapse them, unless they contained new records, in which case, leave them expanded<br>CSubclassReportControl<br>{<br>...<br>&nbsp;&nbsp;&nbsp; std::list&lt;CXTPReportRecord*&gt; m_NewRecords;<br>&nbsp;&nbsp;&nbsp; CXTPReportRecord* AddRecord(CXTPReportRecord* pRecord)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION pos = m_NewRecords.Find(pRecord);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!pos)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_NewRecords.AddTail(pRecord);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return __super::AddRecord(pRecord);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; void Populate()<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CList&lt;CString&gt; collapsedRows;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; CXTPReportRows *pRows = GetRows();<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; for (int i = 0; i &lt; pRows-&gt;GetCount(); i++)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPReportRow *pRow = pRows-&gt;GetAt(i);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pRow &amp;&amp; pRow-&gt;IsGroupRow() &amp;&amp; !pRow-&gt;IsExpanded())<br>&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; CXTPReportGroupRow* pGroupRow = (CXTPReportGroupRow*) pRow;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collapsedRows.AddTail(pGroupRow-&gt;GetCaption());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __super::Populate();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pRows = GetRows();<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; for (int i = 0; i &lt; pRows-&gt;GetCount(); i++)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPReportRow *pRow = pRows-&gt;GetAt(i);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; if (pRow &amp;&amp; pRow-&gt;IsGroupRow())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; CXTPReportGroupRow* pGroupRow = (CXTPReportGroupRow*) pRow;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; CString caption = pGroupRow-&gt;GetCaption();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION pos = collapsedRows.Find(caption);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pos)<br>&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;&nbsp;&nbsp;&nbsp;&nbsp; bool foundNew = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPReportRows *pChilds = pRow-&gt;GetChilds();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int j = 0; j &lt; pChilds-&gt;GetCount(); j++)<br>&nbsp;&nbsp;&nbsp;&n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p;&nbsp; m_NewRecords.RemoveAll();<br>&nbsp;&nbsp;&nbsp; }<br>};<br>]]>
   </description>
   <pubDate>Tue, 17 May 2011 16:32:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=64426&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#64426</guid>
  </item> 
  <item>
   <title><![CDATA[Adding a row to a collapsed CXTPReportControl : I am also noticing the same problem....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=61601&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#61601</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6497">Sneemaster</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 29 November 2010 at 12:32pm<br /><br />I am also noticing the same problem. Are there any updates on this? Can we force-collapse the rows after we run the Populate command? If so, how do we determine if the rows were originally collapsed?]]>
   </description>
   <pubDate>Mon, 29 Nov 2010 12:32:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=61601&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#61601</guid>
  </item> 
  <item>
   <title><![CDATA[Adding a row to a collapsed CXTPReportControl : I have just updated my project...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=61248&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#61248</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6060">acwest</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 03 November 2010 at 4:25pm<br /><br />I have just updated my project to use the latest version of the toolkit (13.4.2) and still see the same behaviour. Is there any way to have collapsed rows NOT expand?&nbsp;]]>
   </description>
   <pubDate>Wed, 03 Nov 2010 16:25:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=61248&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#61248</guid>
  </item> 
  <item>
   <title><![CDATA[Adding a row to a collapsed CXTPReportControl : Hi,  I am using ActiveX but...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=58666&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#58666</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 25 May 2010 at 3:25pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I am using ActiveX but I think it has same problem... Call Populate automatically expands&nbsp;all collapsed&nbsp;rows.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>And to all other MFC users, why don't you reply on this? Only nagging about bugs/problems isn't what a forum is about, helping your fellow users thats what's a forum is for !!!! </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 25 May 2010 15:25:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=58666&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#58666</guid>
  </item> 
  <item>
   <title><![CDATA[Adding a row to a collapsed CXTPReportControl : So does anybody have any ideas...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=58510&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#58510</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6060">acwest</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 14 May 2010 at 4:59pm<br /><br />So does anybody have any ideas on why my control is being expanded? Does anybody else have the same behavior?<br>]]>
   </description>
   <pubDate>Fri, 14 May 2010 16:59:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=58510&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#58510</guid>
  </item> 
  <item>
   <title><![CDATA[Adding a row to a collapsed CXTPReportControl :   In our application, we have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=58413&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#58413</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6060">acwest</a><br /><strong>Subject:</strong> 16689<br /><strong>Posted:</strong> 10 May 2010 at 5:15pm<br /><br />In our application, we have a CXTPReportControl containing a potentially large number of rows. The problem I am having is that it appears that when a row is added into the tree, if the user has collapsed the tree, it gets expanded automatically. I would like to prevent this from happening. I put some breakpoints in the code, and CXTPReportRow::SetExpanded does not appear to be called...<br>-Craig<br>]]>
   </description>
   <pubDate>Mon, 10 May 2010 17:15:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16689&amp;PID=58413&amp;title=adding-a-row-to-a-collapsed-cxtpreportcontrol#58413</guid>
  </item> 
 </channel>
</rss>