Id Name Status Action
81 Selfish Snail
82 Prehistoric Toon Interactive
83 Disturbed Dunlin
84 Itchy Impala
85 Good Gnu
86 Dance Dance Jazz Park
87 Fisher Price Bingo Man
88 Bewildering Batman Revenge
89 Political Scorched Earth Syndrome
90 Naughty Narwhal
91 Xenophobic Xenomorph
92 Cooperative Camel
93 Famous Falcon
94 Samurai Dance Fiasco
95 Terrible Teira
96 Robot Dating Force
97 Better Butterfly
98 Yellowed Yacare
99 Cruel Crayfish
100 Morbidly Obese Maze Playhouse
( Items: 81 - 100 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;
}