- Home
- Forum
- Angular - EJ 2
- Add column and dropdownedit dynamically
Add column and dropdownedit dynamically
Hello !
I want to be able to add Columns dynamically and dropdownedit also. But I cannot succeed to see the list of values in the dropdown when I edit or add a row.
<ejs-grid #grid [dataSource]='datat' [editSettings]='editSettings' [toolbar]='toolbar' height='272px' >
[columns]='columns'>
</ejs-grid>
public data: any;
public columns: Object[];
public toolbar: ToolbarItems[];
public editSettings: EditSettingsModel;
ngOnInit() {
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Dialog', showDeleteConfirmDialog: true };
this.toolbar = ['Add', 'Edit', 'Delete'];
this.columns = [
{
field: 'Currency', editType: 'dropdownedit', width: 150,
edit: { params: { query: new Query(), dataSource: [{ text: 'USD' }, { text: 'GBP' }, { text: 'EUR' }], fields: { text: 'text', value: 'text' } } }
}
];
}
- Delete package.lock.json file from your application.
- Remove the @syncfusion package folder from the node_modules.
- Use latest version or “*”(Installs the latest packages) for all Syncfusion components in package.json file.
- Then install the NPM packages.
- Share us the entire column and Grid rendering code.
- Share us sample data bound in the Grid.
- If possible share us a simple sample to replicate the problem or try reproducing it in the above provided sample.
Shame on me...
You was right !!
thank you so much !
- 3 Replies
- 2 Participants
- Marked answer
-
FR Frédéric
- Aug 3, 2021 06:02 AM UTC
- Aug 5, 2021 06:12 AM UTC