Hi Johann,
To answer your first question - using a filter in the expand expression is not supported for GetByFilter scenarios, but only when you are getting items by id (GetById). This is why the requests are failing. To accomplish what you are trying to do you need to employ "lazy loading" as shown in the documentation.
For example:
The following hierarchical datasource will read the CustomUser type. After that it will get all the relations to the Account type by filter where the MainAccount is equal to true. Finally on the next request it will get all the related Transactions to the expanded account or by the specified filter.
Please note that in the example we are using a CustomUser type because at the current stage expanding deeper than one level for the Users type is not supported.
For more details on lazy loading please check the hierarchical datasource documentation: http://docs.telerik.com/platform/backend-services/javascript/integrations/kendoui/kendoui-uihierarchical-data-source
Let me know if you have questions.
Regards,
Vasil
Telerik
To answer your first question - using a filter in the expand expression is not supported for GetByFilter scenarios, but only when you are getting items by id (GetById). This is why the requests are failing. To accomplish what you are trying to do you need to employ "lazy loading" as shown in the documentation.
For example:
var
accountsExpandNode = {
relation:
"AccountIds"
,
filter: {
MainAccount:
true
}
};
var
tsactionsExpandNote = {
relation:
"TransactionIds"
,
filter: {}
};
var
hierarchicalDS = Everlive.createHierarchicalDataSource({
"typeName"
:
"CustomUser"
,
"expand"
: [accountsExpandNode, tsactionsExpandNote]
});
The following hierarchical datasource will read the CustomUser type. After that it will get all the relations to the Account type by filter where the MainAccount is equal to true. Finally on the next request it will get all the related Transactions to the expanded account or by the specified filter.
Please note that in the example we are using a CustomUser type because at the current stage expanding deeper than one level for the Users type is not supported.
For more details on lazy loading please check the hierarchical datasource documentation: http://docs.telerik.com/platform/backend-services/javascript/integrations/kendoui/kendoui-uihierarchical-data-source
Let me know if you have questions.
Regards,
Vasil
Telerik
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.