BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
var pvt = {
key: true
}
export default {
data() {
return {
data: data,
grid: "",
toolbar: ["Add", "Delete", "Update", "Cancel"],
flag: true,
pageOption: {
pageSize: 12
},
editSettings: {
allowEditing: true,
allowAdding: true,
allowDeleting: true,
mode: "Batch"
}
};
},
methods: {
dataBound: function(args) {
var obj = {field: "ShipCountry", headerText: "Ship Country", width: "300"};
this.$refs.grid.ej2Instances.columns.push(obj);
if(pvt.key) { // you need to push this new column to the grid’s columns property and call the refreshColumns method to achieve your requirement
pvt.key = false; //It helps to prevent the recursive call
this.$refs.grid.ej2Instances.refreshColumns();
}
},
provide: {
grid: [Edit, Toolbar, Page]
}
};
|