Able to find the solution. For the reference of other community users:
I was declaring the toolbar variable as :
toolbar!: ToolbarItems[];
And the try to add initialize like:
this.toolbar = ["Add", "Edit", "ColumnChooser", "PdfExport", "ExcelExport", "CsvExport", "Search",
{
text : 'Import',
tooltipText: 'Import Users',
prefixIcon : 'e-people',
id : 'import'
}, {
text : 'DownloadTemplate',
tooltipText: 'Download Template',
prefixIcon : 'e-group-2',
id : 'downloadTemplate'
}
];
And getting error.
Solution:
Declare like:
toolbar!: any;
That will add Import and Download option in the toolbar (Referring above mentioned example)
html code:
<ejs-grid #grid
[dataSource] = "usersData"
[allowSorting] = "true"
[allowFiltering] = "true"
[allowGrouping] = "true"
[editSettings] = "editSettings"
[toolbar] = "toolbar"
.
.
.