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

Tab strip reset view scroll

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mat-Moo
Top achievements
Rank 1
Mat-Moo asked on 19 Jan 2013, 10:28 PM
I've got a pretty standard app layout with a tab strip at the bottom, and headers at the top. However the content of a lot of it is generated depending on an option on my home screen. When this option is changed and the screens re-populated, I'd like to reset the scroll of each view back to the top. However even though I've seen lots of threads about app.scroller and reset() etc. I can't seem to get the desired effect, it does seem to go back to the top, but then Iose my headers and tab strip etc...

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 21 Jan 2013, 01:49 PM
Hello,

If you want to reset the scroll of all views, you have to find all the views' elements get their js objects and from there to get their scrollers.

The code that you need to invoke in order to reset scroll-state everywhere should be similar to (if not directly) the following:

$(".km-view").each(function() {
   var view = $(this).data("kendoView");
   view.scroller.reset();
});

The kendo team is considering an API to access the views easily.

I hope this is helpful.


Regards,
Nikolay Tsenkov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
Tags
General Discussions
Asked by
Mat-Moo
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or