This is a migrated thread and some comments may be shown as answers.

Fixing a scroll position hack I have...

3 Answers 65 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 21 Oct 2008, 09:20 PM
I currently have 2 tabs on a page that each do postbacks on there own.  In order to keep the scroll position of the scheduler(we use a 24 hour week view) when the user tabs off the scheduler tab I used the following code and save it off until they tab back to scheduler:

        xCalendarPos = $get('<%= RadSched.ClientID %>').childNodes(1).scrollLeft;
        yCalendarPos = $get('<%= RadSched.ClientID %>').childNodes(1).scrollTop;    

It works fine in IE but as I try to make the app work with more browsers(firefox specifically) I've run into issues.   Is there a method now to get the scroll position?
This is in the current release(not the beta)

3 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 22 Oct 2008, 04:23 PM
This provides me with what I need:
        yCalendarPos = $find("<%= RadSched.ClientID %>").get_scrollTop();

There is no need to know the width.

0
Peter
Telerik team
answered on 23 Oct 2008, 07:29 AM
Hi Michael,

Here is a related kb article which you may also find helpful: 

How to scroll into view a specific time slot on initial page load


Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Michael
Top achievements
Rank 1
answered on 23 Oct 2008, 08:12 PM
Nice.  I don't have a current use for that but I have another app that will.  Thanks.
Tags
Scheduler
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Peter
Telerik team
Share this question
or