Id Name Status Action
681 Phoenix Wright: Boxing Princess
682 We Love Desert Blaster
683 Intense Balloon Tale
684 Thoughtful Toad
685 Successful Stag
686 Sore Starling
687 Zombie Spelling on the Oregon Trail
688 Generic Jackhammer of Love
689 Tired Tapir
690 Eco-Friendly Helicopter Pimps
691 The Simpsons' Theme Park in Busytown
692 Distinguished Cardboard vs. Capcom
693 Dizzy Dingo
694 Zany Zebra
695 M.C. Escher Blimp Struggle
696 Wrath of the Cardboard Bastards
697 Children of the Manlove from Hell
698 Dead Dolphin
699 Cthulhu Godzilla Dudes
700 Yucky Yacare
( Items: 681 - 700 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;
}