\Kendo\UI\GridColumnSortable

A PHP class representing the sortable setting of GridColumn.

Methods

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):

    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');
    ?>

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve the information

close
Dummy