Event onSort

FIRED if is something sorted
$grid->onSort[] = function (array $sortArr, $currentMovedId) {
    // do some SQL for save sort
Argument Type Description
$sortArr array array of row primary keys
$currentMovedId int The primary key of row, with which it was moving

Event onEditCell

FIRED if is cell edited and saved
$grid->onEditCell[] = function ($lineId, $columnName, $newValue, $oldValue, $dataValue = NULL) {
    // do some SQL for save edited column
Argument Type Description
$lineId int Current line ID
$columnName string Column name that was changed
$newValue string New value
$oldValue string Old value
$dataValue string added value from data-value html attribute on current column

Event onFilter

FIRED if is something filtered
$grid->onFilter[] = function (Mesour\DataGrid\Extensions\Filter $filter) {
    // do something
Argument Type Description
$filter Mesour\DataGrid\Extensions\IFilter instance of current filter extension