JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Customize toolbar › Reply To: Customize toolbar
June 21, 2022 at 1:05 pm
#103322
Participant
Hi Joko,
You can pass a callback function to the onInit property as the toolbar HTML Element is passed as an argument. OnInit belongs to the header property of the grid. When you have the toolbar HTML Element you can select any button you want and customize it.
Here is a simple example:
header: {
visible: true,
onInit: (toolbar) => {
const sortButton = toolbar.querySelector(‘div[smart-id=”sortButton”]’);
sortButton.classList.add(‘custom-button’);
}
},
Best regards,
Svetoslav Borislavov
Smart UI Team
-
This reply was modified 2 years, 8 months ago by
svetoslav_borislavov.
-
This reply was modified 2 years, 8 months ago by
svetoslav_borislavov.