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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable grid but not the scroll

Thread ID:

Created:

Updated:

Platform:

Replies:

147301 Sep 5,2019 12:24 PM UTC Sep 9,2019 11:08 AM UTC Angular - EJ 2 3
loading
Tags: Grid
Manolo Capdevila
Asked On September 5, 2019 12:24 PM UTC

Hi,

I need disabled the grid, I follow these steps



But it disable the scroll, I need that user can scroll horizontal

Thanks

Thavasianand Sankaranarayanan [Syncfusion]
Replied On September 6, 2019 10:48 AM UTC

Hi Manolo,  
 
Greetings from Syncfusion support. 
 
We have analyzed the reported query “Disable grid but not the scrollat our end. 
 
We have achieved your requirement using manually adding and removing disablegrid class for grid elements. We suggest using the getContentTable and getHeaderTable method to fulfill your need.  
 
Refer the below help documentation. 
 
 
 
For your request, please refer the below code and sample 
 
[app.component.css] 
 
.disablegrid { 
        pointer-events: none; 
        opacity: 0.4; 
    } 
    .wrapper { 
        cursor: not-allowed; 
    } 
 
[app.component.ts] 
 
 
public btnClick(): void { 
        if (this.Grid.getContentTable().classList.contains('disablegrid')) { 
 
            this.Grid.getContentTable().classList.remove('disablegrid'); 
            this.Grid.getHeaderTable().classList.remove('disablegrid'); 
            document.getElementsByClassName('e-toolbar')[0].classList.remove('disablegrid'); 
            document.getElementById('GridParent').classList.remove('wrapper'); 
             
        } else { 
            // To disable the grid table 
            this.Grid.getContentTable().classList.add('disablegrid'); 
            // To disable the grid header 
            this.Grid.getHeaderTable().classList.add('disablegrid'); 
            // To disable the Toolbar  
            document.getElementsByClassName('e-toolbar')[0].classList.add('disablegrid'); 
            document.getElementById('GridParent').classList.add('wrapper'); 
        } 
    } 
 
 
Please check the documentation/sample link and get back to us, if you require any further assistance on this. 
 
Regards, 
 
Thavasianand S. 


Manolo Capdevila
Replied On September 6, 2019 12:32 PM UTC

Ok, Thanks

But, it is possible, in future, that your grid has the property disabled and do it automatically?



Thavasianand Sankaranarayanan [Syncfusion]
Replied On September 9, 2019 11:08 AM UTC

Hi Manolo, 

By default, we can disable the complete Grid by using that single CSS which we can used in our documentation but based on your query we found that you want to disable, except scrollbars in Grid. So, for your case we need to do customization in CSS and also we can achieve this by using the CSS style alone. 

[app.component.css] 

.e-grid table, .e-grid .e-toolbar { 
            opacity: 0.4; 
            pointer-events: none; 
        } 


We have modified the previously provided sample in the following link. 


Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon