And filter on foreignkey fields

Hello Syncfusion Team,

I'm working with the grid control with some foreign key fields and URL Adaptor.
I want to filter the grid by these foreignkey field with an 'AND' condition.

Suppose that we have 2 columns with these values:

Column1
text: Value1, value: 1
text: Value12, value: 2
text: Value3, value: 3

Column2
text: Value3, value: 4
text: Value34, value: 5
text: Value5, value: 6

If I filter only Column1 by the value "Value1", it builds this sql query (I report only the where filter):

(1 = `Extent1`.`Column1`) OR (12= `Extent1`.`Column1`)

It is right.

But if I filter Column1 by value "Value1" and Column2 by value "Value3", it builds this sql query:

((1 = `Extent1`.`Column1`) OR (12= `Extent1`.`Column1`)) OR ((4 = `Extent1`.`Column2`) OR (5= `Extent1`.`Column2`))


Instead, I want to achive this:

((1 = `Extent1`.`Column1`) OR (12= `Extent1`.`Column1`)) AND ((4 = `Extent1`.`Column2`) OR (5= `Extent1`.`Column2`))


How can I do that?



1 Reply

BM Balaji Marimuthu Syncfusion Team March 24, 2016 08:36 AM UTC

Hi Omar,

Thanks for contacting Syncfusion support.

We considered this “Multiple foreignkey columns filter on  “or” predicate instead of “and” operation” as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents


Regards,
Balaji Marimuthu


Loader.
Up arrow icon