Print Page | Close Window

SOLVED: First Visible Row

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=11474
Printed Date: 20 July 2025 at 8:17am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: First Visible Row
Posted By: McKloony
Subject: SOLVED: First Visible Row
Date Posted: 17 July 2008 at 3:39am

I use a RC with EditOptions = True to edit some data inside the RC. If I save the changes to the recordset i make a complete reload to the RC. If the reload is complete i use the ReportRows(i).EnsureVisible and the ReportRows(i).Selected = True function to go to the row, i edit before. If tehre is are a lot of rows, the selected row is not at ther original position on the screen like before. In this case a property like ReportRows.FirstVisible would be very helpful. Is it possible to get a properly or a workaround for this problem?



-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6



Replies:
Posted By: Peter59
Date Posted: 17 July 2008 at 4:05am
Just an idea...

Take a look at the MoveFirstVisibleRow method from the ReportNavigator object. The description sounds like you could build a workaround for your problem.

Let us know, if you were successfull.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6


Posted By: McKloony
Date Posted: 17 July 2008 at 5:04am

Yes, if it is possible to get the RowNumber oder RowIndex of the moved row.

ReportNavigator.MoveFirstVisibleRow
i = RpRow.Index
 
doesn't work


-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: joeliner
Date Posted: 17 July 2008 at 5:08am
hi,

i beleive there is a shorter way to achieve this but my approach kinda works for me :)

1. set the wndReportControl.TopRowIndex and FocusedRow.Index before reload to a variable
2. After reload set wndReportControl.Navigator.MoveToRow [FocusedRow.Index], False, False to stored varibles.
3. wndReportControl.TopRowIndex = [TopRowIndex]

 





-------------
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6


Posted By: McKloony
Date Posted: 17 July 2008 at 5:54am
Thanks, this is simple and works

-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6



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