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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change all EJS grid columns on button click event?

Thread ID:





147392 Sep 9,2019 11:34 AM UTC Sep 10,2019 05:39 AM UTC Angular - EJ 2 1
Tags: Grid
Jayjit Pandit
Asked On September 9, 2019 11:34 AM UTC

Please let me know how I can change all EJS grid columns to new one on button click event?

Pavithra Subramaniyam [Syncfusion]
Replied On September 10, 2019 05:39 AM UTC

Hi Marko, 
Thanks for contacting Syncfusion support. 
You can change the Grid columns dynamically by setting the “grid.columns” property. Please refer to the below code example, documentation link and sample link for more information. 
this.grid.columns = [ { field: 'OrderDate', headerText: 'Order Date', width: 130, format: 'yMd', textAlign: 'Right' }, 
                { field: 'Freight', width: 120, format: 'C2', textAlign: 'Right' }, 
                { field: 'ShippedDate', headerText: 'Shipped Date', width: 140, format: 'yMd', textAlign: 'Right' }, 
                { field: 'ShipCountry', headerText: 'Ship Country', width: 150 }]; 
Please get back to us if you need any further assistance on this. 
Pavithra S. 


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