Ublaboo\DataGrid\DataGrid::setSortable PHP Method

setSortable() public method

Set grido to be sortable
public setSortable ( boolean $sortable = TRUE ) : static
$sortable boolean
return static
    public function setSortable($sortable = TRUE)
    {
        if ($this->getItemsDetail()) {
            throw new DataGridException('You can not use both sortable datagrid and items detail.');
        }
        $this->sortable = (bool) $sortable;
        return $this;
    }
DataGrid