Remote search filter query issue

Hi Team,

I have implemented remote data binding using WebApiAdaptor and data fetch is smooth.

But when I enable Search module in toolbar and tried to do some search, the filter param in the URL becomes buggy.

This is the example param gets added to the url when I search 'text' in the search bar.

$filter=(substringof(%27text%27,tolower(cast(id,%20%27Edm.String%27))))%20or%20(substringof(%27text%27,tolower(cast(registration_name,%20%27Edm.String%27))))%20or%20(substringof(%27text%27,tolower(cast(partner_id,%20%27Edm.String%27))))%20or%20(substringof(%27text%27,tolower(cast(is_own,%20%27Edm.String%27))))%20or%20(substringof(%27text%27,tolower(cast(is_idle,%20%27Edm.String%27))))

PLease let me know how to proceed with the search for Remote binding.

TIA


5 Replies

PS Pavithra Subramaniyam Syncfusion Team February 23, 2022 02:49 PM UTC

Hi Boopathy, 

Currently we are validating the reported scenario “Searching query issue with WebAPIAdaptor” at our side and we will provide further details on February 25th, 2022. Until then we appreciate your patience. 

Regards, 
Pavithra S 



BO Boopathy replied to Pavithra Subramaniyam February 24, 2022 04:15 PM UTC

Okay! I'll wait.



JC Joseph Christ Nithin Issack Syncfusion Team February 25, 2022 02:11 PM UTC

Hi Boopathy, 

   Thanks for your patience. 

   By default when you perform search action in the toolbar, it will search each columns separately hence the query params will be sent separately for each columns in the filter query. This is not a bug this is the default behavior.  

Please get back to us for further details. 

Regards, 
Joseph I. 



BO Boopathy February 26, 2022 01:15 AM UTC

Okay!

It is not a bug.

Whatever you say is true for client side search.

As I have mentioned earlier, I'm doing it on the server side. When I hit search, my URL query parameters look like in the image below!


Let me how to proceed!

Or Could you please share me a demo which has server side search enabled?


TIA



JC Joseph Christ Nithin Issack Syncfusion Team February 28, 2022 02:14 PM UTC

Hi Boopathy, 

  Thanks for your update. 

  By default, the webapi service does not have inbuilt support to handle the search query ( using $search) while performing the search operation. Hence to overcome this limitations from our side, we have handled in such a way to send the search operation query as a $filter query which filters each column in the grid separately by creating separate predicates to each column in the grid. That is why the url query parameter looks like the way it is in your screenshot. It is enough for you to handle filtering in your webapi service to enable searching in your grid.  

   If you are still facing any issue in performing searching please get back to us with more details on the issue you are facing. 

Regards, 
Joseph I. 


Loader.
Up arrow icon