[SOLVED] Navigator.MoveToRow does not work |
Post Reply |
Author | |
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
Posted: 13 August 2010 at 7:39am |
Subject Continued: "with the ReportControl using Grouping Column and Tree Column..."
Hi, I have a requirement to scroll a ReportControl that has both a Grouping Column and a Tree Column to a specific row. Using either "EnsureVisible" or "Navigator.MoveToRow" does work kind of! However the Grouping row seems to knock this out slightly and the moment I expand a few tree columns then try and use either of these to scroll to the row in question it does not scroll to the correct row! To help you understand I have attached an image of my application below. In the image below you can clearly see the Grouping column and Tree columns are used and that the Highlighted Row is the row I have tried to scroll to. However this has scrolled to the wrong row due to the Grouping row heights I believe. If I then scroll up further and expand a few tree columns and then move to the row the result is worse!!! I am using the Statusbar "Forecast Products" pane as a button to focus the users attention to the Forecasted Products in the ReportControl, however this functionality can't work using the "EnsureVisible" or "Navigator.MoveToRow" in combination with the Grouping Column and a Tree Column. Is there any method other than these two to scroll programmatically to a row? Thanks. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Try this instead:
Dim rowToFind As ReportRow
Set rowToFind = Me.wndReportControl.Rows.FindRowInTree(Me.wndReportControl.Records(INDEX_OF_RECORD)) rowToFind.EnsureVisible OR
Set rowToFind = Me.wndReportControl.Rows.FindRowInTree(Me.wndReportControl.Records(INDEX_OF_RECORD))
Me.wndReportControl.Navigator.MoveToRow rowToFind.Index |
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Nice one Aaron!!!
Using your suggestion I first set the grid to scroll to the last record in the grid before scrolling to the row in question. This allows the record to be at the top of the ReportControl, tested this with expanding the tree and all works perfectly.
I must admit... I tried this late on Friday before I got your reply, but it was late in the day and all I could think about was the weekend!!! lol Thanks for the help. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |