Order by

Info Ordering is enabled by default.
Info Multi column ordering is disabled by default.

Usage

Really simple style

Disable ordering on specific column

$grid->addText('name', 'Name')
        ->setOrdering(FALSE);

Set default order

Info It will be overwritten if user use ordering on else column
$grid->setDefaultOrder('column_key', 'ASC'); // or DESC

Allow ordering for many columns

$grid->enableMultiOrdering();

Disable ordering on all columns

$grid->disableOrdering();

Demo


#NameSurname
1JohnDoe
2PeterLarson
3ClaudeGraves
4StuartNorman
5KathyArnold
6JanWilson
7AlbertaErickson
8AdaWells
9EthelFigueroa
10IanGoodwin
11FrancisHayes
12ErmaBurns
13KristinaJenkins
14VirgilHunt
15MaxMartin
16MelodyManning
17CatherineTodd
18DouglasStanley
19PattiDiaz
20JohnPetterson