Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142812 | Feb 20,2019 04:18 PM UTC | Feb 22,2019 12:46 PM UTC | Vue | 5 |
![]() |
Tags: Data Grid |
<button id="duplicate">Duplicate column</button>
<ejs-grid id="Grid" :dataSource="data" height='315px'>
...
</ejs-grid>
document.getElementById("duplicate").addEventListener("click", (e) => {
var obj = document.getElementById('Grid').ej2_instances[0] //Get the instance for Grid
var duplicate = obj.columns[0]; //Get the column to duplicate(Here we have took the first column)
obj.columns.push(duplicate); //Push the column object of the column to be duplicated
obj.refresh(); //refresh the Grid to show the changes
});
|
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.
This page will automatically be redirected to the sign-in page in 10 seconds.