I wish to add button field in layout grid(without using UI component), After adding button, also need to add click function to that field. Please provide me a solution to add button as a field in the grid.

1 Answer 1


I hope you are trying to add a separate button with some required action. In that case, you can load the row with renderer file, in that renderer, you can call the PHTML template, like below.

public function render(DataObject $row)
    $block = <load-your-block-file>;
    return $block->toHtml();

And I hope you can load your button with $row as dynamic data for required action

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.