Id Name Status Action
481 Pro Matador Stars
482 Ultimate Porn Invaders
483 Mushy Mosquito
484 Ninja Unicycle Park
485 Glowing Penguin Uprising
486 Drug-Induced Football Uprising
487 Muddy Macaque
488 Maniac Castlevania Slaughter
489 3D Amish Solid
490 Fantastic Flatworm
491 Poor Pony
492 8-Bit Paintball Fiesta
493 Handsome Hamster
494 Ashamed Ape
495 Mexican Bow Hunter Horde
496 Lair of the Devil Syndrome
497 Metal Robot - Hot Pursuit
498 Enchanting Earthworm
499 Tactical Makeover Mania
500 Bloody Buffalo
( Items: 481 - 500 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;
}