Id Name Status Action
581 Children of the Donkey Arena
582 A Boy and His Dog Strikes Again
583 Intelligent Catapult Trader
584 Big Terrorist Conquest
585 Forgotten Pinball Gone Wild
586 Envious Elephant
587 Amused Albatross
588 Amused Albatross
589 Omega Sunshine Hell
590 Communist Stick Explosion
591 Wooden Penguin Slayer
592 Little Karaoke Adventure
593 John Romero Army Planet
594 Combative Constrictor
595 Pixellated Flatulence Daredevils
596 Bonk Dance Demolition
597 Secret of the Vocabulary Wranglers
598 Easy Eland
599 Sparkling Sheep
600 Maniac Software in Middle-Earth
( Items: 581 - 600 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->addColumnNumber('id', 'Id')
		->setAlign('start')
		->setFilterText();

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

	$grid->addColumnStatus('status', 'Status');

	$inlineAdd = $grid->addInlineAdd();

	$inlineAdd->setPositionTop()->onControlAdd[] = function ($container): void {
		$container->addText('name', '')
			->setRequired('aaa');
		$container->addText('birth_date', '');
		$container->addText('link', '');
		$container->addSelect('status', '', [
			'active' => 'Active',
			'inactive' => 'Inactive',
			'deleted' => 'Deleted',
		]);
	};

	$inlineAdd->onSubmit[] = function ($values): void {
		$this->dibiConnection->insert(
			'users',
			[
				'name' => $values['name'],
				'status' => $values['status'],
				'countries_visited' => 1,
				'birth_date' => new DateTime(),
			]
		)->execute();
		$this->flashMessage('Record was added!', 'success');
		$this->redrawControl('flashes');
	};

	return $grid;
}