This is a migrated thread and some comments may be shown as answers.
Scrollview
5 Answers 40 Views
This is a migrated thread and some comments may be shown as answers.
Mat-Moo
Top achievements
Rank 1
Mat-Moo asked on 04 Feb 2013, 10:40 PM
Is it possible to disable a scrollview via code? I use one as a selector, but once entry has started, it would be nice to disable it.

5 Answers, 1 is accepted

Sort by
0
Kristian D. Dimitrov
Telerik team
answered on 05 Feb 2013, 02:34 PM
Hi Mat-Moo,

 After my research i couldn't find a "kendo" way to disable the scrolling of the scroll view. You can call its destroy method, but then you can't restore the scroll view. The workaround is to set the styles of the scrolling element. In the following sample "#scrollView" is the id of your scroll view and ".page" is a common class for your pages inside the scroll view. When you click on a page the scrolling is disabled and when you are done, clicking "#someButton" will resume the scrolling.

$(".page").on("click",function(e){
       
        $("#scrollView")[0].children[0].setAttribute('style', '-webkit-transform:none !important');
    })
    $("#someButton").on("click",function(){
        $("#scrollView")[0].children[0].setAttribute('style', '-webkit-transform:');
    });
Regards,
Kristian D. Dimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Mat-Moo
Top achievements
Rank 1
answered on 05 Feb 2013, 02:42 PM
Thanks, will try that out :)
0
Kristian D. Dimitrov
Telerik team
answered on 05 Feb 2013, 03:37 PM
Hi Mat-Moo,

 In the first fix i missed to persist the current transformation of the list view and it navigates to first page, so the code should look like this: 

$(".page").on("click",function(e){
         var currentTransform =  
$(
"#scrollView")[0].children[0].style.webkitTransform;
       $("#scrollView")[0].children[0].setAttribute('style', "-webkit-transform:"+ currentTransform + '!important');
   });
   $("#enableButton").on("click",function(){
       $("#scrollView")[0].children[0].setAttribute('style', '-webkit-transform:');
   });

 If the first solution doesn't work, there is another one, but it will affect all events inside the scroll view.

$(".page").on("click",function(e){
   
    $("#scrollView")[0].setAttribute('style', "pointer-events: none");
});
$("#enableButton").on("click",function(){
    $("#scrollView")[0].setAttribute('style', "pointer-events:");
});


Greetings,
Kristian D. Dimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Sowjanya
Top achievements
Rank 1
answered on 28 Oct 2013, 01:14 PM
Hi,
When i applied  'data-stretch=true',  'DisallowOverScroll = true' , data-zoom = true properties for set screen Zoom and fix view moving to my project, but zoom is not working and also my designing is not showing properly. How to apply Zoom & fix view moving to my project without designing problem? Can anyone help please?

Regards,
Sowjanya.
0
Kristian D. Dimitrov
Telerik team
answered on 30 Oct 2013, 12:39 PM
Hello Sowjanya,

Could you please provide us with some more information about your issue in order for us to be able to help you. A code snippet  here or a simple project that isolates your issue would be great.

Regards,
Kristian D. Dimitrov
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Asked by
Mat-Moo
Top achievements
Rank 1
Answers by
Kristian D. Dimitrov
Telerik team
Mat-Moo
Top achievements
Rank 1
Sowjanya
Top achievements
Rank 1
Share this question
or