<?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 : Default scroll in populate</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Default scroll in populate]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 06 Mar 2026 22:59:34 +0000</pubDate>
  <lastBuildDate>Tue, 14 Mar 2023 07:15:32 +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=24371</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[Default scroll in populate : Can you add a parameter that will...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24371&amp;PID=78655&amp;title=default-scroll-in-populate#78655</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9273">jw_statica</a><br /><strong>Subject:</strong> 24371<br /><strong>Posted:</strong> 14 March 2023 at 7:15am<br /><br />Can you add a parameter that will disable the default functionality of setting the scroll at the beginning<br>list of items, when we don't have an item focused in the list? This setting is done in "Populate" operation in CXTPReportControl.<br><div><br></div><div>Problematic code in CXTPReportControl (In XTPGridControl is the same):</div><div><pre style="font-family:C&#111;nsolas;font-size:13px;color:gainsboro;:#1e1e1e;"><span style="color:#569cd6;">void</span>&nbsp;CXTPReportControl<span style="color:#b4b4b4;">::</span>Populate<span style="color:#b4b4b4;">()</span><span style="color:#b4b4b4;">{<br>...<br></span><span style="color:#d8a0df;">if</span>&nbsp;<span style="color:#b4b4b4;">(</span>GetRows<span style="color:#b4b4b4;">()-&gt;</span>m_nFocusedRow&nbsp;<span style="color:#b4b4b4;">==</span>&nbsp;<span style="color:#b4b4b4;">-</span><span style="color:#b5cea8;">1</span><span style="color:#b4b4b4;">)</span><span style="color:#b4b4b4;">{</span>   SetTopRow<span style="color:#b4b4b4;">(</span><span style="color:#b5cea8;">0</span><span style="color:#b4b4b4;">);</span>   <span style="color:#d8a0df;">if</span>&nbsp;<span style="color:#b4b4b4;">(</span>GetRows<span style="color:#b4b4b4;">()-&gt;</span>GetCount<span style="color:#b4b4b4;">()</span>&nbsp;<span style="color:#b4b4b4;">&gt;</span>&nbsp;<span style="color:#b5cea8;">0</span><span style="color:#b4b4b4;">)</span>   <span style="color:#b4b4b4;">{</span>      GetRows<span style="color:#b4b4b4;">()-&gt;</span>m_nFocusedRow&nbsp;<span style="color:#b4b4b4;">=</span>&nbsp;<span style="color:#b5cea8;">0</span><span style="color:#b4b4b4;">;</span><br>      ...   <span style="color:#b4b4b4;">}</span><span style="color:#b4b4b4;">}</span><span style="color:#d8a0df;">else</span><span style="color:#b4b4b4;">{</span>   EnsureVisible<span style="color:#b4b4b4;">(</span>GetFocusedRow<span style="color:#b4b4b4;">());</span><span style="color:#b4b4b4;">}</span></pre></div><div><br></div>In our application, parent pane window set empty focus (SetFocusRow(nullptr)) in ReportControl on OnKillFocus action. <br>That results the list always scroll to the beginning.]]>
   </description>
   <pubDate>Tue, 14 Mar 2023 07:15:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24371&amp;PID=78655&amp;title=default-scroll-in-populate#78655</guid>
  </item> 
 </channel>
</rss>