I am able to sort 1st object (orders1) as below example1 but please let me know is it possible to sort 2nd object same as like 1st object in the kendo grid.
Example 1:
var order1 :Country :'US'; Company:' Ship'
var order2 : Country : (name: 'US'; id :12; items: {id: 13; itemname: 'item1'}, {id : 14; itemname: item2} ), Company: ({ id: 20; idealfor:'oil'; name :''company1' }, { id: 22; idealfor:'metal'; name :''company2' });
$(#tablename).kendoGrid({ datasource :order1,
page:6},
sortable:{ mode: 'single', allowunsort:false},
columns:{{ field:'company', title:'company', sortable: { intialditection: 'desc' }, { field:'company', title: 'country'}
}}
})
Hi Venkat,
I am not sure I udnedrtand the issue correctly. However, in case you need to sort the dataSource based on nested objects you could take a look at the example below:
sort: { field: "country.name", dir: "desc" }
The approach is demonstrated in the Dojo linked here - https://dojo.telerik.com/@NeliK/uZUdaxOC.
If this is not the case, please provide some more details about the scenario and expected result so I could get a better idea of the desires functionality and provide further assistance.
Regards,
Neli