Hi,
I have a requirement where i need to sort only the parent rows in the treeList, while the child rows retain the default ascending order.
1. Is there a way i can use compare method to retain sort order of child rows?
2. I also have to sort the parent rows for all pages in the treeList. I have implemented pagination using the method mentioned in this thread. How can sorting on entire data set be achieved?
I have used the sort hack mentioned in the thread:
// sort hack!
var originalSortFn = kendo.data.TreeListDataSource.fn.sort;
kendo.data.TreeListDataSource.fn.sort = function (e) {
if (arguments.length > 0) {
myODataSource.sort(e);
}
return originalSortFn.apply(this, arguments);
};
But, this hack code sorts the content in the displayed page first, then takes the entire data set. As a result, we see the data getting bound twice to the treeList, first time with the sort data of current page and then with the sorted data for entire data set. How can this be avoided? I want the data to be bound only once, after the sorting of entire data set?
I don't have a working jsfiddle example for this problem.
Thanks in advance.