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

GRID Add button navigate to my custom route

Thread ID:

Created:

Updated:

Platform:

Replies:

140605 Oct 28,2018 08:28 PM UTC Oct 29,2018 05:29 AM UTC Angular - EJ 2 2
loading
Tags: Grid
Marko
Asked On October 28, 2018 08:28 PM UTC

Hi Team,
I write Angular application and I use grid of Syncfusion. Syncfusion grid have great functionality. But I don't know how can I implement toolbar settings with custom Add button.
For example.
I add add button, and add button have default functionality, I want override that.
When I click add button on grid I want that navigate to my component.(*/something/add)
Could I do that with grid?

tony
Replied On October 29, 2018 01:38 AM UTC

This worked for me

  this.toolbarOptions = [{text: 'Add User', prefixIcon: 'e-btn-icon e-add e-icons e-icon-left'}, 'Search'];

  toolbarClick(args: ClickEventArgs): void {
    if (args.item.text === 'Add User') {
      this.router.navigate(['profile'], { relativeTo: this.activatedRoute});
    }

    args.cancel = true;
  }

Mohammed Farook J [Syncfusion]
Replied On October 29, 2018 05:29 AM UTC

Hi Marko, 
 
Thanks for contacting Syncfusion support. 
 
Yes, you can add the customer toolbar item by using ‘Toolbar-template’ and you can handle the customer toolbar item functionality by using ‘toolbarClick’ event. Please find the documentation for your reference. 
 
 
Regards, 
J Mohammed Farook  


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

or the page will be automatically redirected to 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

;