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

Hiding Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

145584 Jun 28,2019 10:30 PM UTC Jul 1,2019 11:38 AM UTC Blazor 1
loading
Tags: Grid
Ivan Petrov
Asked On June 28, 2019 10:30 PM UTC

Hello,

Do you provide any built-in functionality for removing grid columns? Something like the filter functionality but there are checkboxes with the column names next to them.


Vignesh Natarajan [Syncfusion]
Replied On July 1, 2019 11:38 AM UTC

Hi Ivan,  

Thanks for contacting Syncfusion forums. 

Query: “Do you provide any built-in functionality for removing grid columns? Something like the filter functionality but there are checkboxes with the column names next to them. 

Yes. We have in built support to show / hide columns using a check box. Using ColumnChooser feature you can hide the visible column / show the hidden column and the column chooser is rendered within the Grid toolbar. Refer the below code example and screenshot to enable the column chooser in Grid. 

<EjsGrid id="Grid" AllowPaging="true" ShowColumnChooser="true" toolbar="@(new List<string>() { "ColumnChooser" })"> 
    <EjsDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></EjsDataManager> 
    <GridColumns> 
        <GridColumn Field="OrderID" HeaderText="Order ID" ISPrimaryKey="true" TextAlign="@Syncfusion.EJ2.RazorComponents.Grids.TextAlign.Right" Width="90"></GridColumn> 
        <GridColumn Field="CustomerID" HeaderText="First Name" Width="90"></GridColumn> 
        <GridColumn Field="EmployeeID" HeaderText="Employee ID" Width="90"></GridColumn> 
        <GridColumn Field="Freight" HeaderText="Freight" Width="90"></GridColumn> 
    </GridColumns> 
</EjsGrid> 

 

Note: Uncheck the check boxes of the corresponding column name and click the OK button, it will hide those columns.  

For your convenience we have prepared a sample which can be downloaded from below  


Please get back to us if you have further queries.   

Regards,
Vignesh Natarajan. 


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