Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - initial position on x axis of a grid
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

initial position on x axis of a grid

 Post Reply Post Reply
Author
Message
tmartinson View Drop Down
Newbie
Newbie


Joined: 16 May 2008
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tmartinson Quote  Post ReplyReply Direct Link To This Post Topic: initial position on x axis of a grid
    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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 3:40pm
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....
Back to Top
tmartinson View Drop Down
Newbie
Newbie


Joined: 16 May 2008
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tmartinson Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2008 at 5:31pm
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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2008 at 3:19pm
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....
Back to Top
tmartinson View Drop Down
Newbie
Newbie


Joined: 16 May 2008
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tmartinson Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2008 at 5:09pm
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.


Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2008 at 12:13am
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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.139 seconds.