public function setEditableColumns($callback = NULL)
    {
        $this->onRender[] = function(Grid $grid) use ($callback) {
            if (!$grid->hasColumns()) {
                return;
            }

            foreach ($grid->getComponent(Column::ID)->getComponents() as $column) {
                if ($column instanceof Editable && !$column->isEditableDisabled() && !$column->editableCallback) {
                    $column->setEditable($callback);
                }
            }
        };

        return $this;
    }
public function setEditableColumns($callback = NULL)
    {
        $this->onRender[] = function(Grid $grid) use ($callback) {
            if (!$grid->hasColumns()) {
                return;
            }

            foreach ($grid->getComponent(Column::ID)->getComponents() as $column) {
                if ($column instanceof Editable && !$column->isEditableDisabled() && !$column->editableCallback) {
                    $column->setEditable($callback);
                }
            }
        };

        return $this;
    }
public function setEditableColumns ( $ callback = NULL ) { $ this -> onRender [ ] = function ( Grid $ grid ) use ( $ callback ) { if ( ! $ grid -> hasColumns ( ) ) { return ; } foreach ( $ grid -> getComponent ( Column :: ID ) -> getComponents ( ) as $ column ) { if ( $ column instanceof Editable && ! $ column -> isEditableDisabled ( ) && ! $ column -> editableCallback ) { $ column -> setEditable ( $ callback ) ; } } } ; return $ this ; }
Sets all columns as editable.
First parameter is optional and is for implementation of method for saving modified data.
@param callback $callback function($id, $newValue, $oldValue, Editable $column) {}
@return Grid
Sets all columns as editable . First parameter is optional and is for implementation of method for saving modified data .