Group actions:
Id Name Birthday Action
1 001 sss 12. 6. 2024
1 002 moje 12. 6. 2024
1 003 tvoje 12. 6. 2024
1 004 xxx 12. 6. 2024
1 005 Ahoj! 12. 6. 2024
1 006 Ahoj click 12. 6. 2024
1 007 111 12. 6. 2024
1 008 tesa111 12. 6. 2024
1 009 Klikam na enter 12. 6. 2024
1 010 klikam na enter22222222 12. 6. 2024
1 011 lplplpl 2. 7. 2024
1 012 fdsfsd 5. 7. 2024
1 013 Nová položka 2. 8. 2024
1 014 Ccv 10. 9. 2024
1 015 Ccv 10. 9. 2024
1 016 ASD 16. 9. 2024
1 017 jjj 24. 9. 2024
1 018 adsfadsf 26. 9. 2024
1 019 testUser 29. 9. 2024
1 020 fghggf 16. 11. 2024
( Items: 1001 - 1020 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;
}