\Kendo\UI\GridColumnSortable
A PHP class representing the sortable setting of GridColumn.
Methods
allowUnsort
If set to true the user can get the grid in unsorted state by clicking the sorted column header. If set to false the user will not be able to unsort the column once sorted.
Returns
\Kendo\UI\GridColumnSortable
Parameters
$value boolean
Example
<?php
$sortable = new \Kendo\UI\GridColumnSortable();
$sortable->allowUnsort(true);
?>
compare
A JavaScript function which is used to compare the values. It has the same signature as the compare function accepted by Array.sort.The basic function implementation is as follows (pseudo-code): pseudo function compare(a, b, descending) { if (a is less than b by some ordering criterion) { return -1; }
One notable exception is that we also supply a third parameter that indicates the sort direction (true for descending). See How-to: Stable Sort in Chrome for more details on how this can be useful.
Returns
\Kendo\UI\GridColumnSortable
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$sortable = new \Kendo\UI\GridColumnSortable();
$sortable->compare(new \Kendo\JavaScriptFunction('function() { }'));
?>
initialDirection
Determines the inital (from un-sorted to sorted state) sort direction. The supported values are asc and desc.
Returns
\Kendo\UI\GridColumnSortable
Parameters
$value string
Example
<?php
$sortable = new \Kendo\UI\GridColumnSortable();
$sortable->initialDirection('value');
?>