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

How to add column?

I am gonna import new column in the datagrid.
Help me..
Let me know, please.
Regards.


1 Reply

MS Madhu Sudhanan P Syncfusion Team February 20, 2019 12:22 PM UTC

Hi Michal, 

Thanks for contacting Syncfusion support. 

You can add new column to the existing grid column using the columns property as follows. 


<ejs-grid ref='grid' :dataSource="data" :allowPaging='true' :dataBound="dataBound"> 
    . . . .  
</ejs-grid> 

this.$refs.grid.columns.push({ field: 'CustomerName', headerText: 'Customer Name', width: 150 }) 
this.$refs.grid.columns = [...this.$refs.grid.columns]; //Assign the new set of columns to the columns property 


If this didn’t helped please get back to us with more information on your requirement. 

Regards, 
Madhu Sudhanan P 


Loader.
Live Chat Icon For mobile
Up arrow icon