dataSource with query and filter columns issue with foreignKeyField

I am using a grid with a OData data source in combination with a query. The query has a expand keyword in it. The query is executed correclty.

The issue is that if I want to filter a foreign key column, then the executed filter query includes the query from the grid, which in my opinion is wrong. In my expamle I want to load datasource A with a query that expands with object B. But when I filter for a foreign key colum of Type C then the executed query includes the expand(B) which does not even exists on type C. Therefore the request results in an error.

I tried a little bit and also if I put a new dummy Query().where('Id', 'greaterthan', 5) as grid query then the filter query includes this. In this example I want to load items of type A that have an Id > 5. When I want to filter for a foreign column of type B then I do not want to have this filter be applied to that query. The resulting query on type B is Id  > 5 which is not what I assumed

Reproduction steps:
  1. Define a OData data source to a grid
  2. Add a query to the same grid (preferably use colums inside this filter that are unique to that entity)
  3. Add a foreign key colum
  4. Now filter that foreign key column. If the query set in step 2 is invalid for entity of the [dataSource] for that column then the execution fails
  5. If the query set in step 2 is valid for the entity of the [dataSource] for that column then the result might be wrong

All the best,
Michael Mairegger

1 Reply 1 reply marked as answer

MS Manivel Sellamuthu Syncfusion Team December 21, 2020 12:49 PM UTC

Hi Michael, 
 
Sorry for the delay getting back to you. 
 
We can reproduce the reported behavior at our end and we have confirmed this is an issue from our side and logged a bug for the same as Grid query is included with foreignkey column request”. At Syncfusion, we are committed to fixing all validated defects (subject to technical feasibility and Product Development Life Cycle ) and it will be included with our upcoming January 6, 2021 Patch Release. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
 
 
Please get back to s if you need further assistance with this. 
 
Regards, 
Manivel 


Marked as answer
Loader.
Up arrow icon