initial position on x axis of a grid |
Post Reply |
Author | |
tmartinson
Newbie Joined: 16 May 2008 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 16 May 2008 at 2:20pm |
Is there a way to preserve where the slider is on a reportcontrol grid?
We have a grid with more fields (columns) than can physically fit on the screen, so a slider is generated to get to the fields on the right. When a user presses page down we clear the grid and load new records. The problem is if they scrolled (left to right) anywhere on the line of a report control grid, the place the user was looking is not preserved to where it was before the pressed the key, and they have to slide to the right to see the column they were looking at. I tried setting the focus to the a particular column, but this does not preserve where the user was (left to right) on the screen before a page down, for example was pressed. Does anyone have any ideas? We are using Xtreme Report Control for Acitve X version 11.1.3. Thanks, Tom |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Try this:
wndReportControl.Columns(4).EnsureVisible
or
wndReportControl.Navigator.MoveToColumn 4
|
|
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.... |
|
tmartinson
Newbie Joined: 16 May 2008 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
|
I fear I must be missing the obvious. When I tried using movetocolumn or ensurevisible, I got the field being referred to be in focus not necessarily anywhere specifically on the screen. I have tried using the navigator to move it all the way to the right and other such things, but the column that is on the left is never guaranteed to be the one I want.
Example: I have name, address, city, state, zip on each line. The user has scrolled over to the city field. Since name and address are too big you can only see the city, state and the first part of the zipcode on the screen. (you would see name and address if you moved the slider to the left) When the user hits a page down, I want to load the next set of records in, clear the screen and position the of the slider in such a way that the field "city" is still the left-most column. (in other words I want to column headings to "change" back to where they were before I cleared the screen). As it is now, I have to move the slider back to where it was before I can see the column I was looking at. Thanks, Tom |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I can't reproduce your problem in any way, I have been trying to get the same problem you have, but I can't. This control is so fantastic that I can't produce the problem
At first I thought it was the repopulating of the ReportControl but it seems that the scrollbar maintains it's position after populating. I found out just before I want to give up.
Please check the sample and add the code that will reproduce your problem
|
|
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.... |
|
tmartinson
Newbie Joined: 16 May 2008 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks for the example!
I loaded Visual Basic on my machine and then entered code similar to the code in our library and fixed the problem. There was a grid.coulumns.deleteall() in the code that I had not noticed before. (it was in a function written by a consultant we had here a year ago) Even though the problem was 100% my stupidity I thank you for the example. You motivated me to get Visual Basic on my machine. I think is a lot simpler to use Visual Basic than our main environment. |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Only deleting columns will have the effect you mentioned, thats true.
Well I'm glad it works
|
|
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.... |
|
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 |