Deleted!
Id Name Action
101 Elite Grizzly Bear Insanity Blahblah
102 Legendary Yak in Africa Blahblah
103 Testy Tiger Blahblah
104 Professional Cheese Trivia Blahblah
105 Thoughtful Teira Blahblah
106 Unstoppable Transvestite Country Blahblah
107 Blue-eyed Barracuda Blahblah
108 Motionless Macaw Blahblah
109 Mighty Helicopter Special Edition Blahblah
110 Mystical Volleyball Dudes Blahblah
111 Neon Driving Squadron Blahblah
112 Lazy Locust Blahblah
113 Luigi Quantum Freak Blahblah
114 Profane Buddhist Dystopia Blahblah
115 Elegant Bowling Fight Blahblah
116 Delightful Duck Blahblah
117 Bizarre Kangaroo - 2nd Impact Blahblah
118 Creepy Cicada Blahblah
119 Transvestite Plumber Feud Blahblah
120 Ugly Unicorn Blahblah
( Items: 101 - 120 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->setSortable();

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

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

	$multiAction = $grid->addMultiAction('multi_blah', 'MultiAction')
		->addAction('blah', 'Blahblah', 'blah!')
		->addAction('blah2', 'Blahblah2', 'blah!', ['name']);

	$multiAction
		->getAction('blah2')
		->setIcon('check');

	$grid->addAction('blah', 'Blahblah', 'blah!')
		->setClass('btn btn-xs btn-primary ajax');

	$grid->addAction('this', '')
		->setIcon('redo')
		->setClass('btn btn-xs btn-success');

	$actionCallback = $grid->addActionCallback('custom_callback', '');

	$actionCallback
		->setIcon('sun')
		->setTitle('Hello, sun')
		->setClass('btn btn-xs btn-default btn-secondary ajax');

	$actionCallback->onClick[] = function ($itemId): void {
		$this->flashMessage('Custom callback triggered, id: ' . $itemId);
		$this->redrawControl('flashes');
	};

	$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->addToolbarButton('this', 'Toolbar')->addAttributes(['foo' => 'bar']);
	$grid->addToolbarButton('this#2', 'Button', ['foo' => 'bar']);

	return $grid;
}