Group actions:
Id Name Birthday Action
801 Strange Seahorse 19. 4. 1973
802 Battle Buddhist Massacre 18. 12. 1971
803 Adventurous Angelfish 18. 10. 1996
804 Viking Cricket Extra 17. 6. 1985
805 Lair of the Gun Championship 23. 5. 1933
806 Tropical Catapult Strikes Back 27. 12. 1991
807 Shiny Salamander 5. 3. 1959
808 Unsightly Unicorn 4. 6. 1996
809 Disturbed Dingo 16. 5. 1977
810 Tense Thrush 20. 1. 1955
811 Arcane Jetpack Frenzy 20. 3. 1972
812 Xerothermic Xenomorph 2. 1. 1940
813 Alive Anteater 2. 3. 1999
814 Bonk Spatula in Vegas 2. 9. 1931
815 Light Llama 13. 11. 1961
816 Average Anaconda 14. 5. 1941
817 Dance Dance Night City 7. 12. 1931
818 Jolly Jellyfish 6. 11. 1950
819 Energetic Elk 4. 3. 1982
820 Atomic Carnival X 21. 1. 1960
( Items: 801 - 820 from 1020 )
  See the code below 👇 or see GitHub
public function createComponentGrid(): DataGrid
{
	$grid = new DataGrid();

	$grid->setDataSource($this->dibiConnection->select('*')->from('users'));

	$grid->setItemsPerPageList([20, 50, 100]);

	$grid->setRowCallback(function ($item, $tr): void {
		$tr->addClass('super-' . $item->id);
	});

	$grid->addColumnNumber('id', 'Id')
		->setAlign('start')
		->setSortable();

	$grid->addColumnText('name', 'Name')
		->setSortable();

	$grid->addColumnDateTime('birth_date', 'Birthday');

	$grid->addAction('detail', '', 'this')
		->setIcon('sun')
		->setTitle('Detail');

	$grid->addAction('delete', '', 'delete!')
		->setIcon('trash')
		->setTitle('Delete')
		->setClass('btn btn-xs btn-danger ajax')
		->setConfirmation(
			new StringConfirmation('Do you really want to delete example %s?', 'name')
		);

	$grid->addGroupAction('Delete')->onSelect[] = [$this, 'groupDelete'];

	$grid->allowRowsGroupAction(fn ($item): bool => $item->id % 2 === 0);

	$grid->allowRowsAction('delete', fn ($item): bool => $item->id % 3 === 0);

	$grid->allowRowsAction('detail', fn ($item): bool => $item->id % 4 === 0);

	return $grid;
}