Print Page | Close Window

Default scroll in populate

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=24371
Printed Date: 23 April 2024 at 1:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Default scroll in populate
Posted By: jw_statica
Subject: Default scroll in populate
Date Posted: 14 March 2023 at 7:15am
Can you add a parameter that will disable the default functionality of setting the scroll at the beginning
list of items, when we don't have an item focused in the list? This setting is done in "Populate" operation in CXTPReportControl.

Problematic code in CXTPReportControl (In XTPGridControl is the same):
void CXTPReportControl::Populate()
{
...
if (GetRows()->m_nFocusedRow == -1) { SetTopRow(0); if (GetRows()->GetCount() > 0) { GetRows()->m_nFocusedRow = 0;
... } } else { EnsureVisible(GetFocusedRow()); }

In our application, parent pane window set empty focus (SetFocusRow(nullptr)) in ReportControl on OnKillFocus action.
That results the list always scroll to the beginning.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net