We declare a “spinner” which will be useful after.
And we create our button :
– name : the name of the button
– label : the text inside the button
– class : a html class for the button (will be displayed in orange with “primary” class)
– url : button URL. Magento changes * with current url part, so “*/*/new” will become “jobs/department/new”

7 thoughts on “Create adminhtml grid with Magento 2”

Hi Max, After I go ‘Add New Button’ Step. I have issue need your help . I can’t create “Add New Button” although I did check my code with your code. It’s same but I don’t know why it’s not working !!!. Pls help me Max !!!. Thank you so much

What is the problem ? No button display ? Have you got some error ?
-> Check the name and the path of your files
-> Remove var/generation and var/view_preprocessed folders
-> Check the content of the var/log/system.log file, you can get some clues of your problem