PHP code example of doomy / datagrid
1. Go to this page and download the library: Download doomy/datagrid library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
doomy / datagrid example snippets
public function createComponentClientDataGrid(): IComponent
{
$dataGrid = new DataGrid(
$this->dataGridEntryFactory,
$this->data,
DataEntity::class,
[],
);
$dataGrid->setReadOnly(FALSE);
$dataGrid->onEvent(DataGrid::EVENT_ITEM_SAVED, function($values) {
$this->data->save(DataEntity::class, $values);
});
return $dataGrid;
}