service.getData(tempSkip, $scope.queuePageSize).success(function (data, status, headers, config) { $scope.messages = data; $scope.showCaption = false; $scope.loadingMessages = false;}).error(function (data, status, headers, config) { $scope.workingText = 'Oh CRUD ! Change a few things up and try again.'; console.log('error getting messages'); $scope.loadingMessages = false;});(function () { 'use strict'; angular .module('app') .service('messageQueueService', ['$http', messageQueueService]); function messageQueueService($http) { var baseUrl = rootUrl + 'api/MessageQueue/'; this.getData = getData; function getData(skip, take) { return $http({ url: baseUrl + 'Get', params: { val1: skip, val2: take }, method: 'GET' }); }}})();(function () { 'use strict'; angular .module('app') .factory('messageQueueKendoDsService', ['$http', messageQueueKendoDsService]); function messageQueueKendoDsService($http) { var baseUrl = rootUrl + 'api/MessageQueue/'; var knedoDataSource = new kendo.data.DataSource({ transport: { read: { async: false, url: baseUrl + 'Get', dataType: 'json' } }, batch: false, serverPaging: true, serverSorting: true, serverFiltering: true, schema: { model: { id: 'Id', fields: { parentId: { field: 'FenergoMessageId', nullable: true }, Id: { field: 'Id', type: 'number'} } } } }); return knedoDataSource; }})();$scope.treelistOptions = { dataSource: messageQueueDataSource, sortable: true, columns: [ { field: 'Id', title: 'Message ID' }, { field: 'FenergoMessageId', title: 'Fenergo ID' } ]};<div> <div data-kendo-treelist="" data-options="treelistOptions"></div></div>
I've found a small bug in the grid which has an impact on sorting.
To reproduce this issue, execute the following:
Create a grid that allows SingleColumn sorting. DO NOT SET the following:
JavaScript
sortable: { mode: 'single' }
If configured like above, you won't be able to reproduce the bug.
It should be configured the following way:
JavaScript
sortable: true
If you configure the Grid with the MVC HtmlHelper (.Sortable(a => a.SortMode(GridSortMode.SingleColumn)), you will get the sortable: true as Javascript output.
- Enable the column menu
- Sort a column
- Sort another column by using the column menu (use the small arrow).
You have now achieved multi-column sorting while only a single column should be able to be sorted (default value of sortable is single!​).​
If you have server side sorting on, you will notice you will receive 2 objects in the sorts object.