This is a migrated thread and some comments may be shown as answers.

[Solved] Search As You Type - Binary Operation 'Coalesce" is not supported

8 Answers 164 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sven
Top achievements
Rank 1
Sven asked on 08 Jul 2011, 02:48 AM
Hi guys,

I was trying to implement the Search As You Type from the demo, however I am getting "Unhandled Exception Code: 4004..Binary Operation 'Coalesce' is not supported'

I am using RadDomainDataSource.

Can you help please.

Thanks
SD 

8 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Jul 2011, 07:23 AM
Hello,

 Have you checked this demo

Greetings,
Vlad
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Sven
Top achievements
Rank 1
answered on 08 Jul 2011, 03:11 PM
Hi Vlad,

Could you help me understand why am I getting the above error. I looked at the Demo you proposed but that only filters based on 1 column. I am not sure if both can be combined. Also I am guessing that the query for your proposed demo, is expecting a variable, where my query returns all ordered by the ID column. I want to search based on all columns.

Thank you for your help.
SD
0
Rossen Hristov
Telerik team
answered on 08 Jul 2011, 04:46 PM
Hi Sven,

Do WCF RIA Services support this? In other words, if you use a stock DomainDataSource do you get the same thing?

You can search by all columns if you add one FilterDescriptor for each column to the FilterDescriptors collection of RadDomainDataSource. Then set RadDomainDataSource.FilterDescriptors.LogicalOperator to OR. Then each time the text in the search text-box changes, transfer it to the Value property of each FilterDescriptor.

This will produce a query like (pseudo-code)

FirstName IsEqualTo 'jo' OR MiddleName IsEqualTo 'jo 'OR LastName IsEqualTo 'jo '

Which basically does what you need.

I hope this helps.

Kind regards,
Ross
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Sven
Top achievements
Rank 1
answered on 08 Jul 2011, 05:29 PM
I will try all that, though I am curious as to what EF / RIA Services are you guys using in your demo? Can I use the same?

I just tried to implement the demo that Vlad suggested - the result is still the same error, however before the error comes up, I can see the GridView updating with filtered results. My Grid has some columns with blank cells - wonder if that has anything to do with this. Also all, but the ID, columns are Nullable.

I will keep you posted.

SD
0
Sven
Top achievements
Rank 1
answered on 08 Jul 2011, 06:57 PM
Hi Ross,

I tested it with the standard ria domaindatasource and it works fine. Can we figure out why the RadDomainDataSource control is not working in this scenarion? I am still interested in how you wrote your query in the DataService to support your demo?

Thanks again
SD
0
Rossen Hristov
Telerik team
answered on 11 Jul 2011, 08:18 AM
Hello Sven,

That is weird, since the query that both controls produce should be the same. In face, you can attach to their Loading events and inspect the query which is about to be sent to the server. It could be found in the event arguments. Can you check both queries and see whether they are the same or different?

Could you please, send me a sample project which has both the stock DomainDataSource and RadDomainDataSource side by side, and demonstrates how the stock one works correctly and the RDDS does not. I will debug it against our source to see what the difference is. In other words, I will comment out one of them and run the project, then swap them and run it again and I will do a comparison.

I am looking forward to hearing from you.

Greetings,
Ross
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
John
Top achievements
Rank 1
answered on 02 Nov 2011, 05:02 AM
I ran into this same issue today following the example.  Here is the query I got from the loading event of the radDomainDataSource.  

{AspecCRM_BusApp_v1.Web.StudentPM[].Where(item => (((((IIF((item != null), item.StudentID, 0) == 0) OrElse (IIF((item != null), item.Lastname, null) ?? "").ToLower().Contains("a".ToLower())) OrElse (IIF((item != null), item.FirstName, null) ?? "").ToLower().Contains("a".ToLower())) OrElse (null ?? "").ToLower().Contains("a".ToLower())) OrElse (IIF((item != null), item.IsActive, False) == False))).Take(10)}
0
Rossen Hristov
Telerik team
answered on 02 Nov 2011, 10:02 AM
Hello John,

This is an indication that the query is generated for a LINQ-to-Objects provider. The query generator does not "know" that you are going to use this query with WCF RIA Services. That is why WCF RIA fails to execute this query.

I have attached a sample project that demonstrates how to do server-side search with RadDomainDataSource. You can modify it to go to the server on each letter typed, but I do not think that this will be very efficient in a client-server environment.

I hope this helps.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Sven
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Sven
Top achievements
Rank 1
Rossen Hristov
Telerik team
John
Top achievements
Rank 1
Share this question
or