We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Error - Creating custom Toolbar item


It shows me this error when I try to create my custom item in the toolbar. 

How can I fixed it?

3 Replies

MS Madhu Sudhanan P Syncfusion Team January 29, 2019 09:39 AM UTC

Hi Ane, 

Thanks for contacting Syncfusion support. 

You can specify the toolbar variable type as below to resolve this problem 

import { ToolbarItems } from '@syncfusion/ej2-angular-grids'; 
import { ItemModel } from '@syncfusion/ej2-angular-navigations'; 
    selector: 'control-content', 
    templateUrl: 'normal-edit.html', 
export class NormalEditComponent implements OnInit { 
    public toolbar: (ToolbarItems | ItemModel)[]; 
    public ngOnInit(): void { 
        this.toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel', { text: 'Click', ... }]; 

Madhu Sudhanan P 

AN Ane January 29, 2019 01:12 PM UTC

Thank you!

MS Madhu Sudhanan P Syncfusion Team January 29, 2019 01:25 PM UTC

Hi Ane, 
Thanks for the update. Please get back to us if you need any assistance. 

Live Chat Icon For mobile
Up arrow icon