Id Name Status Action
301 Ashamed Armadillo
302 Super Cooking Psychiatrist
303 Lazy Kabuki Pioneer
304 Odd Octopus
305 Relieved Raven
306 Legacy of Vocabulary Fest
307 Hazardous Octopus Mania
308 Amused Armadillo
309 Mega Man Puzzle Dystopia
310 Flying Porn Hoedown
311 Sid Meier Flatulence Squadron
312 Vast Vendace
313 Ashamed Albatross
314 Poised Puffin
315 Street Metal Nitro
316 Irritating Lizard - The Lost Levels
317 Ultraviolent Pachinko 2000
318 Insane Plunger Anarchy
319 Blushing Booby
320 Magnetic Amish Empire
( Items: 301 - 320 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;
}