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

Grid Column visibility is not working

Thread ID:

Created:

Updated:

Platform:

Replies:

142604 Feb 12,2019 02:59 AM UTC Jul 23,2020 12:27 PM UTC Vue 5
loading
Tags: Data Grid
Jzy
Asked On February 12, 2019 02:59 AM UTC

Hi,

I try to use the visibility for grid column, but as for the sample given in https://ej2.syncfusion.com/vue/documentation/grid/columns/#visibility, the ShipCity column is defined as visible false, however, from the preview, the column is still visible, so it is not working properly?

Thanks,
Jzy

Pavithra Subramaniyam [Syncfusion]
Replied On February 13, 2019 05:18 AM UTC

Hi Jzy, 
 
Sorry for the inconvenience caused. 
 
You can set the visible property for Grid column as following in Vue. Please refer to the below code example and sample link. 
 
[vue] 
new Vue({ 
              el: '#app', 
              template: ` 
    <div id="app"> 
     <ejs-grid :dataSource="data" :allowPaging='true'> 
           <e-columns> 
            <e-column field='OrderID' headerText='Order ID' textAlign='Right' width=90></e-column> 
            <e-column field='CustomerID' headerText='Customer ID' width=120></e-column> 
            <e-column field='Freight' headerText='Freight' textAlign='Right' width=90></e-column> 
            <e-column field='ShipCity' :visible=false headerText='Ship City' width=120></e-column> 
          </e-columns> 
        </ejs-grid> 
        </ejs-grid> 
     </div> 
`, 
 
 
However, we will correct the documentation for visibility and it will be refreshed in any of our upcoming release. 
 
Regards,  
Pavithra S. 
 


Jzy
Replied On February 13, 2019 07:05 AM UTC

Hi Pavithra,

Thank you so much for clarifying it. So one colon is missing in the example (:visible instead of visible) : )

Thanks,
Jzy

Pavithra Subramaniyam [Syncfusion]
Replied On February 13, 2019 07:16 AM UTC

Hi Jzy,  

Yes. You need to use the provided code(:visible) to achieve your requirement.  We will change it in our documentation as well. 

Please contact us if you need any further assistance. As always, we will be happy to assist you.  

Regards,  
Pavithra S. 


Arun Kumar
Replied On July 22, 2020 09:41 AM UTC

Hi Team,

Is it possible to hide column based on database value? If yes can you share some sample codes. 

I am trying to hide/show column based on some boolean value from database.

Thank,
Arun

Balaji Sekar [Syncfusion]
Replied On July 23, 2020 12:27 PM UTC

Hi Arun, 
 
No, We can define the Grid column property(ex: visible) either with a one value(either true or false) to render, but each record has a different value defined to fields in database so we cannot apply that value to the Grid column property. 
 
If we misunderstood your concern, please share your exact requirement to us that will help to validate further. 
 
Regards, 
Balaji Sekar 


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