Posted 26 May 2021, 8:40 pm EST
Hello,
I am using wijmo grid, how can I add new columns by clicking on add button.
Like when we click on add, all the 5 columns get added.
For example : My first column have dropdown values , other have number input etc.
data: any;
taValue = “value”;
countries = ;
constructor() {
this.data = this._getData();
this.countries = this._getCountries();
}
onClick() {
if (!this.countries.includes(this.taValue)) {
this.countries = […this.countries, this.taValue];
}
}
private _getCountries() {
return “US,Germany,UK,Japan,Italy,Greece”.split(“,”);
}
private _getData() {
let countries = this._getCountries(),
data = ;
for (let i = 0; i < countries.length; i++) {
data.push({
id: i,
country: countries[i],
comments: “”,
});
}
return data;
}
Thank you.
Regards,
Nivisha Panwar