Reputation: 11
How do i get a Kendo UI grid orderBy property using jQuery data property?
For example in telerik UI , i can do something like
jQuery("#name").data("tGrid").orderBy
and this gives me the required result,i.e, the columns that the grid is currently being ordered by. I am not able to find corresponding properties in Kendo
.
Similarly I require groupBy and filterBy properties as well.
Upvotes: 1
Views: 7141
Reputation: 11568
To get group by, filter & sort properties, below is the way.. Reference Kendo Grid API documentation
var grid = $('#GridId').data('kendoGrid');
var grouping = grid.dataSource.group();
var filtering = grid.dataSource.filter();
var sorting = grid.dataSource.sort();
//here, sorting[0] will give you the field for which, sorting is done
Upvotes: 5