<?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 : Populate expands child items</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Populate expands child items]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 03:25:20 +0000</pubDate>
  <lastBuildDate>Tue, 18 Sep 2007 16:50:30 +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=6818</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[Populate expands child items : Hi,Hope adding the following update...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=26113&amp;title=populate-expands-child-items#26113</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 18 September 2007 at 4:50pm<br /><br />Hi,<br><br>Hope adding the following update into the code of RemoveRecordEx in bold will fix the problem:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp; ...<br>&nbsp; } while (pRow &amp;&amp; pRow-&gt;IsGroupRow() &amp;&amp; pRow-&gt;GetChilds()-&gt;GetCount() == 0);<br>&nbsp;<br><b>&nbsp; // refresh child indices<br>&nbsp; if(pRow &amp;&amp; pRow-&gt;HasChildren())<br>&nbsp;&nbsp; pRow-&gt;GetChilds()-&gt;RefreshChildIndices();<br>&nbsp; else<br>&nbsp;&nbsp; m_pPlainTree-&gt;RefreshChildIndices();<br></b>&nbsp;<br>&nbsp; bResult = TRUE;<br>&nbsp; ...<br></pre></td></tr></table><br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Tue, 18 Sep 2007 16:50:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=26113&amp;title=populate-expands-child-items#26113</guid>
  </item> 
  <item>
   <title><![CDATA[Populate expands child items : Firstly, it seems to me that the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25960&amp;title=populate-expands-child-items#25960</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2126">bschaer</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 16 September 2007 at 12:37am<br /><br />Firstly, it seems to me that the AddRecordEx should be doing a InternalAddRef() to balance the InternalRelease done within RemoveRecordEx.&nbsp; Beyond that, I have not yet worked thru the Row array logic to understand what is leading to the line 814 assert.]]>
   </description>
   <pubDate>Sun, 16 Sep 2007 00:37:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25960&amp;title=populate-expands-child-items#25960</guid>
  </item> 
  <item>
   <title><![CDATA[Populate expands child items : The logic you have outlined for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25940&amp;title=populate-expands-child-items#25940</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2126">bschaer</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 15 September 2007 at 12:22pm<br /><br /><DIV>The logic you have outlined for updating record data does not work with 11.2.0 because on the RemoveRecordEx call, the record is deleted upon InternalRelease.&nbsp; So I wrapped the Remove/Add with AddRef/Release (below) and this creates a new problem with the row logic at XTReportRow.cpp line 814&nbsp;(<FONT size=1>ASSERT(m_pParentRows-&gt;GetAt(m_nChildIndex) == </FONT><FONT color=#0000ff size=1>this</FONT><FONT size=1>);</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>When only one record is added/updated, no ASSERT triggered.&nbsp; On second record added then updated you get it.</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>I need on the fly inserts and updates without using Populate.&nbsp; The updates need to perform resort/regroup as necessary and I believe you have coded that way.</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>This is a critical situation that I need resolution on soon.&nbsp; Thanks.</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>For new record:</FONT></DIV><DIV><FONT size=1>CMyReportRecord* pNew = </FONT><FONT color=#0000ff size=1>new</FONT><FONT size=1> CMyReportRecord();</FONT></DIV><DIV><FONT size=1><DIV><FONT size=1>pRecord-&gt;m_pSomeItem-&gt;SetValue(SomeInitialValue);</FONT></DIV>GetReportCtrl().AddRecordEx(pNew);</FONT></DIV><DIV><FONT size=1>GetReportCtrl().RedrawControl();</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>For update record:</FONT></DIV><DIV><FONT size=1>pRecord-&gt;m_pSomeItem-&gt;SetValue(SomeNewValue);</FONT></DIV><DIV><FONT size=1>pRec</FONT><FONT size=1>ord-&gt;InternalAddRef();</FONT></DIV><DIV><FONT size=1>GetReportCtrl().RemoveRecordEx(pRecord);</FONT></DIV><DIV><FONT size=1>GetReportCtrl().AddRecordEx(pRecord);</FONT></DIV><DIV><FONT size=1>pRecord-&gt;InternalRelease();</FONT></DIV><DIV><FONT size=1>&nbsp;</DIV></FONT>]]>
   </description>
   <pubDate>Sat, 15 Sep 2007 12:22:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25940&amp;title=populate-expands-child-items#25940</guid>
  </item> 
  <item>
   <title><![CDATA[Populate expands child items : Next version will include it.--WBR,Serge ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25111&amp;title=populate-expands-child-items#25111</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 14 August 2007 at 5:21pm<br /><br />Next version will include it.<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 17:21:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25111&amp;title=populate-expands-child-items#25111</guid>
  </item> 
  <item>
   <title><![CDATA[Populate expands child items : Desperately need the &amp;#034;AddRecordEx&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25044&amp;title=populate-expands-child-items#25044</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2126">bschaer</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 11 August 2007 at 9:57pm<br /><br />Desperately need the "AddRecordEx" logic you have eluded to.....<DIV>&nbsp;</DIV><DIV>Much thanks</DIV>]]>
   </description>
   <pubDate>Sat, 11 Aug 2007 21:57:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=25044&amp;title=populate-expands-child-items#25044</guid>
  </item> 
  <item>
   <title><![CDATA[Populate expands child items : Hi,This is actually a known problem....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=21931&amp;title=populate-expands-child-items#21931</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 13 April 2007 at 3:31pm<br /><br />Hi,<br><br>This is actually a known problem. Unfortunately it's not easy to solveit in terms of Populate logic, but there is another way (as I see it)-- having methods which will add or remove records on the 'fly' (updaterows structure without Populate call).<br> <br>Methods for such remove on the 'fly' have been already added to version 11.1.0 (which is coming soon):<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;CXTPReportControl::RemoveRecordEx<br>&nbsp;&nbsp;CXTPReportControl::RemoveRowEx<br></pre></td></tr></table><br> <br>We plan to add other 'on the fly' method CXTPReportControl::<b>AddRecordEx</b> in the nearest future.<br> <br>In these terms, task with updating a single record (like changing a checkbox) will look like:<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;RemoveRecordEx(pRecord)<br>&nbsp;<br>&nbsp;&nbsp;//edit record data here<br>&nbsp;&nbsp;// ...<br> <br>&nbsp;&nbsp;AddRecordEx(pRecord)<br> <br>&nbsp;&nbsp;AdjustLayout()<br></pre></td></tr></table><br><br>--<br>Regards,<br>Sergey&nbsp; <br>]]>
   </description>
   <pubDate>Fri, 13 Apr 2007 15:31:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=21931&amp;title=populate-expands-child-items#21931</guid>
  </item> 
  <item>
   <title><![CDATA[Populate expands child items : Is there any way to prevent Populate()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=21760&amp;title=populate-expands-child-items#21760</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1801">rmercer</a><br /><strong>Subject:</strong> 6818<br /><strong>Posted:</strong> 09 April 2007 at 10:45am<br /><br />Is there any way to prevent Populate() from changing the collapsed state of child items in the report control?<DIV>&nbsp;</DIV><DIV>This behavior can be reproduced in the ReportSample application.</DIV><DIV>&nbsp;</DIV><DIV>1) Right-click on any group item and choose "Collapse All Groups"</DIV><DIV>2) Expand "From: Bruce Wayne" group.</DIV><DIV>3) Click on checkbox on the far right of the "Bruce Wayne" item.</DIV><DIV>&nbsp;</DIV><DIV>All groups expand after you click the checkbox.</DIV><DIV>&nbsp;</DIV><DIV>In my application I have many child items and the user expects the collapsed states to be retained upon application restart.&nbsp; Whenever an item is added, renamed, or deleted Populate() is called.&nbsp; This causes all child items to expand which is quite annoying to the user.</DIV><DIV>&nbsp;</DIV><DIV>Thank you.</DIV>]]>
   </description>
   <pubDate>Mon, 09 Apr 2007 10:45:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6818&amp;PID=21760&amp;title=populate-expands-child-items#21760</guid>
  </item> 
 </channel>
</rss>