Structures_DataGrid::setDefaultSort() – Set default sorting specification


require_once 'Structures/DataGrid.php';

mixed Structures_DataGrid::setDefaultSort ( array $sortSpec )


If there is no sorting query in the HTTP request, and if the sortRecordSet() method is not called, then the specification passed to setDefaultSort() will be used.

This is especially useful if you want the data to already be sorted when a user first see the datagrid.

This method needs to be called before bind().


array $sortSpec

Sorting specification Structure: array(fieldName => direction, ...)

Return value

returns Either true or a PEAR_Error object


throws no exceptions thrown


This function can not be called statically.

Set multiple datasource options (Previous) Set Renderer (Next)
Last updated: Fri, 09 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.