Good afternoon,
I'm trying to integrate the igHierarchicalGrid in our software. For some of our hierarchical grid we needed to preload the data of the child layout so I try to use the initialDataBindDepth setting it to -1 and also defining the column layout for the desired depth.
That's where I run into an error saying that the $expand is not compatible with de OData V4 syntax.
Is there a way to use the ODataV4 expand query synthax ? if not is any workaround ?
Hello Vincent,
Thank you for posting in our community.
This is an initial update to let you know that we have received your support request regarding the issue with binding igHierarchicalGrid to OData service and I am currently looking into this matter for you. I will keep you posted on my progress and I will get back to you soon with more information or questions for you.
Please feel free to continue sending updates to this case at any time.
Regards, Viktor KombovEntry Level Software DeveloperInfragistics, Inc.
Hello Viktor,
Thanks for your quick response, just to be a little bit more precise:
- I'm using initialDataBindDepth : -1
- I'm loading 3 levels of depth (AssociatedView -> Actions -> Actions)
- I'm getting the following url:$expand=Actions,Actions/Actions instead of $expand=Actions($expand=Actions)
cf. https://github.com/OData/ODataSamples/issues/20
Regards
Thank you for your patience while I was looking into this matter for you.
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 274064.
The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
You can view the status of the development issue connected to this case by clicking on the “Support” tab under “My Cases” list with “In Development” label.
As a temporary workaround, what I can suggest in order to preload the data of the grid is to build the url that contains the data you want before setting the dataSource option to it and to set the odata option to false:
$("#hgrid").igHierarchicalGrid({ odata: false, initialDataBindDepth: -1, responseDataKey: "value", dataSource: "https://services.odata.org/V4/Northwind/Northwind.svc/Customers?$expand=Orders($expand=Order_Details)", ... });
I have created a small sample illustrating my suggestion, which you can find here. Please test the sample on your side and let me know whether you find it helpful.
Looking forward to hearing from you.
Hello victor,
That seems to work thank you for your advise, I ll let you know if I find any drawback.