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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error - Creating custom Toolbar item

Thread ID:

Created:

Updated:

Platform:

Replies:

142321 Jan 28,2019 12:30 PM UTC Jan 29,2019 01:25 PM UTC Angular - EJ 2 3
loading
Tags: Grid
Ane
Asked On January 28, 2019 12:30 PM UTC

Hello, 

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



How can I fixed it?

Madhu Sudhanan P [Syncfusion]
Replied On 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'; 
 
@Component({ 
    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', ... }]; 
        .... 
    } 
} 



Regards, 
Madhu Sudhanan P 


Ane
Replied On January 29, 2019 01:12 PM UTC

Thank you!

Madhu Sudhanan P [Syncfusion]
Replied On January 29, 2019 01:25 PM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;