Id Name Status Action
561 Crazy Pogo Bastards
562 Fantastic Turtle Odyssey
563 Naughty Unicorn Inferno
564 Yawning Yacare
565 Cheerful Camel
566 Musical Thief Boxing
567 Lucky Lion
568 Combative Chicken
569 Gothic Mall Story
570 Paranoid College Fiesta
571 Defiant Dogfish
572 Blue Barracuda
573 Legend of Blade - The Dark Project
574 Glorious Goose
575 Envious Eel
576 Innocent Iguana
577 Profane Animal in the Outback
578 Unbelievable Moped Jamboree
579 Sleepy Swiftlet
580 Nasty Barbarian vs. Capcom
( Items: 561 - 580 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;
}