<?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 : HOWTO: Setting focus after reload from DB?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : HOWTO: Setting focus after reload from DB?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 02:12:10 +0000</pubDate>
  <lastBuildDate>Thu, 01 Sep 2016 11:26:08 +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=20449</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[HOWTO: Setting focus after reload from DB? : Hi;To 1) This is true, but the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75040&amp;title=howto-setting-focus-after-reload-from-db#75040</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 01 September 2016 at 11:26am<br /><br />Hi;<br><br>To 1) This is true, but the first child row may change between reload calls.<br>To 2) The Caption is generated by data out of the database. This content may change too!<br><br>Therefore both suggestions need more investigations by myself.<br><br>Anyway, thanks!<br><br>M.<br>]]>
   </description>
   <pubDate>Thu, 01 Sep 2016 11:26:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75040&amp;title=howto-setting-focus-after-reload-from-db#75040</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Hi Martin,you could store the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75038&amp;title=howto-setting-focus-after-reload-from-db#75038</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8817">cluster</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 01 September 2016 at 8:17am<br /><br />Hi Martin,<br><br>you could store the state of the CXTPReportGroupRow in a map<br><table width="99%"><tr><td><pre class="BBcode">CMap&lt;CString*, CString*, <span ="code-keyword"="">int</span>, int&gt; map;</pre></td></tr></table><br>before you delete ( ResetContent() ) them. After populating and grouping you scan again the Rows and if you match a GroupRow ( IsGroupRow() ) you look in your map for the right caption name and reset the state.<br>]]>
   </description>
   <pubDate>Thu, 01 Sep 2016 08:17:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75038&amp;title=howto-setting-focus-after-reload-from-db#75038</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Two admittedly ugly ideas I can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75037&amp;title=howto-setting-focus-after-reload-from-db#75037</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 01 September 2016 at 7:56am<br /><br />Two admittedly ugly ideas I can think of:<br><br>1) Every group row must have at least 1 child row, correct? If so, you could store information about the GroupRow in the first child row.<br><br>2) Every group row has a unique caption - you can use that as a key for a separate data structure that holds the GroupRow information that links back to your database.<br><br>Hey, I didn't say they were pretty ;)<br>]]>
   </description>
   <pubDate>Thu, 01 Sep 2016 07:56:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75037&amp;title=howto-setting-focus-after-reload-from-db#75037</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Hi;thanks for your reply, but...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75036&amp;title=howto-setting-focus-after-reload-from-db#75036</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 01 September 2016 at 7:21am<br /><br />Hi;<br><br>thanks for your reply, but it is definitely NOT what I am looking or.<br>I want to expand group rows and modify their caption after refetching from database, but only those that were marked as to change before the reload happens.<br>Problem is that group rows have no records attached to them to put some kind of additional identity into. <br><br>But nevertheless, thanks!<br><br>M.<br>]]>
   </description>
   <pubDate>Thu, 01 Sep 2016 07:21:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75036&amp;title=howto-setting-focus-after-reload-from-db#75036</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Hi Martin,I am not sure if I understand...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75035&amp;title=howto-setting-focus-after-reload-from-db#75035</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8817">cluster</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 01 September 2016 at 6:35am<br /><br />Hi Martin,<br><br>I am not sure if I understand you right, but maybe you have a look at the Report Sample:<br><table width="99%"><tr><td><pre class="BBcode"><br><font size="1">void CReportSampleView::OnAutoGrouping()<br>{<br>&nbsp;&nbsp;&nbsp; if (GetReportCtrl().GetColumns()-&gt;GetGroupsOrder()-&gt;GetCount() == 0)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPReportColumn* pColFrom = GetReportCtrl().GetColumns()-&gt;Find(COLUMN_FROM);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetReportCtrl().GetColumns()-&gt;GetGroupsOrder()-&gt;Clear();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetReportCtrl().GetColumns()-&gt;GetGroupsOrder()-&gt;Add(pColFrom);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetReportCtrl().GetColumns()-&gt;GetGroupsOrder()-&gt;Clear();<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; GetReportCtrl().Populate();<br>}<br></pre></td></tr></table><br></font>]]>
   </description>
   <pubDate>Thu, 01 Sep 2016 06:35:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75035&amp;title=howto-setting-focus-after-reload-from-db#75035</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Still no solution for this? ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75030&amp;title=howto-setting-focus-after-reload-from-db#75030</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 31 August 2016 at 11:05am<br /><br />Still no solution for this?<br>]]>
   </description>
   <pubDate>Wed, 31 Aug 2016 11:05:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=75030&amp;title=howto-setting-focus-after-reload-from-db#75030</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Has really no one ever had the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=69798&amp;title=howto-setting-focus-after-reload-from-db#69798</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 03 March 2013 at 2:03pm<br /><br />Has really no one ever had the same to solve????<br>]]>
   </description>
   <pubDate>Sun, 03 Mar 2013 14:03:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=69798&amp;title=howto-setting-focus-after-reload-from-db#69798</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Setting focus after reload from DB? : Hi;I&amp;#039;m populating the report...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=69441&amp;title=howto-setting-focus-after-reload-from-db#69441</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 20449<br /><strong>Posted:</strong> 18 December 2012 at 5:09pm<br /><br />Hi;<br><br>I'm populating the report control with data from a database table. These records are grouped by a single field.<br>Now I'm trying to implement a smart database reload function that restores the state of all rows in the control. This means the group expand state and the selected rows including the single focused row - as far as they still exist after executing the reload.<br>Due to the fact that CXTPReportControl::ResetContent() deletes all record and row collections, I'm unable to use these pointer after the reload. That's absolutely clear!<br>Selecting normal rows is no problem, but since group rows do not have any information inside (calling row-&gt;GetRecord() is NULL) I have no idea how to find the same group row AFTER the reload. So my question is: How can I mark a group row by a tag that i can use as a key to find the same group row in the reloaded control?<br>Did&nbsp; I miss a callback when group rows are created or are there any functions around that help me in solving this issue?<br><br>TIA<br>]]>
   </description>
   <pubDate>Tue, 18 Dec 2012 17:09:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20449&amp;PID=69441&amp;title=howto-setting-focus-after-reload-from-db#69441</guid>
  </item> 
 </channel>
</rss>