We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Disable dragging scroll of grid contents but keep scroll bars enabled

Is there a way to disable the scrolling of the grid when a user clicks and drags their mouse of the contents of the grid? I want to be able to support copying and pasting of the contents and only use vertical and horizontal scroll bars on the grid to scroll the contents... is this possible?

3 Replies

BM Balaji Marimuthu Syncfusion Team September 12, 2014 11:47 AM UTC

Hi Neil,

 

Thanks for using Syncfusion Products.

 

We have created a sample to disable the scrolling of the grid contents while copy text using the mouse can be disable at load event using “enableTouchScroll” API. Please find the below code snippet.

 

<script>

  

    function onLoad(args) {

 

        this.model.scrollSettings.enableTouchScroll = false

      

    }

 

 

</script>

 

 

Please refer the sample here: http://www.syncfusion.com/downloads/support/directtrac/129579/scrolling-1067812941.zip

 

Please let us know if you have any queries.

 

Regards,

Balaji Marimuthu



NE Neil September 12, 2014 12:17 PM UTC

Thanks that worked in disabling the touch scroll.

However I changed it slightly and used it in this way.

$("#myGrid").ejGrid({
    ...
    scrollSettings: { enableTouchScroll: false },
});



AS Alan Sangeeth S Syncfusion Team September 15, 2014 09:07 AM UTC

Hi Neil,

 

Thanks for the update.

 

We are happy to hear that your requirement has been achieved.

 

Please let us know if you need any further assistance. We will be happy to help you out.

 

Regards,
Alan Sangeeth S


Loader.
Live Chat Icon For mobile
Up arrow icon