kendo grid initial sort visual

3 posts, 0 answers
  1. miki
    miki avatar
    2 posts
    Member since:
    Jul 2016

    Posted 01 Aug 2016 Link to this post

    I am trying to define an initial sort.

    as far as the request, the sort is working and the data comes sorted.

    the problem is that in the header, the visual arrow of sort column and direction is not shown.

    only after physical click on the column it shows.
    please help, this is the used code:

    $scope.mainGridOptions = {
                dataSource: {
                    sort: { field: "email", dir: "desc"},
                    serverPaging: true,
                    serverSorting: true,
                    pageSize: 50,
                    transport: {
                        read: {
                            type: "GET",
                            dataType: "json",
                            url: "/p/enduser/licenses/allocation/listWithDevices",
                            headers: {
                                "X-AUTH-TOKEN": authService.getToken()
                        parameterMap: function(data, type) {
                            if (type == "read") {
                                return {
                                    pageSize: data.take,
                                    page: (data.skip/data.take),
                                    sortBy: data.sort?data.sort[0].field:null,
                                    sortDir: data.sort?data.sort[0].dir:null
                    schema: { data: "items", total: "itemsCount" }
                height: $scope.resize(),
                scrollable: {
                    virtual: true
                sortable: {
                    allowUnsort: false,

  2. miki
    miki avatar
    2 posts
    Member since:
    Jul 2016

    Posted 01 Aug 2016 in reply to miki Link to this post

    Here is a demo i made in dojo:

    (Even though the web-server doesnt support sorting, the request is going as sort request, but the visual doesnt represent it.)

    after physical sort on column the arrow appears.

  3. Dimiter Topalov
    Dimiter Topalov avatar
    633 posts

    Posted 02 Aug 2016 Link to this post

    Hello Miki,

    If the server is properly configured, the initial sorting is also visualized in the column header cell:

    The visual indication works as expected for client side sorting via the dataSource.sort option as well:

    You can find out more about server data operations in the following sections of our documentation:

    I hope this helps, but do not hesitate to contact us if you need further assistance.

    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top