Magento – Magento 2 Admin Grid Add/Update Button

admincustom-buttongridmagento-2.2.5

In Magento 2.2.5, I am creating admin grid by following this tutorial(Using layout Block method. Not UI Component).

In that I have a add button. I can't remove it. I need to remove it and add a new button with custom url. How to achieve this.

Screenshot:

Screenshot

Best Answer

You can use update

parent::_construct();
$this->buttonList->update('save', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/<youraction>') . '\')');