Scrollview

6 posts, 0 answers
  1. Mat-Moo
    Mat-Moo avatar
    103 posts
    Member since:
    Nov 2012

    Posted 04 Feb 2013 Link to this post

    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.
  2. Kristian D. Dimitrov
    Admin
    Kristian D. Dimitrov avatar
    68 posts

    Posted 05 Feb 2013 Link to this post

    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.
  3. Kendo UI is VS 2017 Ready
  4. Mat-Moo
    Mat-Moo avatar
    103 posts
    Member since:
    Nov 2012

    Posted 05 Feb 2013 Link to this post

    Thanks, will try that out :)
  5. Kristian D. Dimitrov
    Admin
    Kristian D. Dimitrov avatar
    68 posts

    Posted 05 Feb 2013 Link to this post

    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.
  6. Sowjanya
    Sowjanya avatar
    3 posts
    Member since:
    Oct 2013

    Posted 28 Oct 2013 Link to this post

    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.
  7. Kristian D. Dimitrov
    Admin
    Kristian D. Dimitrov avatar
    68 posts

    Posted 30 Oct 2013 Link to this post

    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.
Back to Top
Kendo UI is VS 2017 Ready