Print Page | Close Window

Devexpress EntityInstantFeedbackSource and Devforce

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3309
Printed Date: 13-May-2026 at 10:36am


Topic: Devexpress EntityInstantFeedbackSource and Devforce
Posted By: Vonzkie
Subject: Devexpress EntityInstantFeedbackSource and Devforce
Date Posted: 29-Feb-2012 at 10:28pm


Hi,

We are using Devexpress Grid using EntityInstantFeedbackSource ( http://documentation.devexpress.com/#WPF/clsDevExpressDataLinqEntityInstantFeedbackSourcetopic - http://documentation.devexpress.com/#WPF/clsDevExpressDataLinqEntityInstantFeedbackSourcetopic ) along with Devforce.

Everything works fine as we can see in the image below. (using NorthwindIB Database)



and when we group it by dragging a column:



this is the code that i used:



As we can see, my QueryableSource is the EntityQuery of Customers, now if i will make it into a projection:



What will happen is that it will return no result and there's an error in the EntityServerError handler:





Take note that this issue is not happening in an Entity Framework 4 projection as well as Devforce Projection in (2-tier mode) it only happens in Devforce (n-tier mode)

Additional issue is that, when I try to group it and the records where huge, the returning results will only be 128 records.

Your help is highly appreciated.

Thanks,
Von



Replies:
Posted By: Vonzkie
Date Posted: 29-Feb-2012 at 10:29pm
Here's the link of the source code: http://dl.dropbox.com/u/21444346/IssueOnGroupingDevforceNTier2.rar

Thanks,
Von


Posted By: sbelini
Date Posted: 01-Mar-2012 at 1:14pm
Thanks Von,
 
I'm taking a look at it.
 
Silvio.


Posted By: sbelini
Date Posted: 01-Mar-2012 at 5:23pm
Hi Von,
The reason this is happening in n-tier only is that DevExpress wrap the results in an effectively non-serializable type and it will fail when the serializer tries to send the results back to the client.
 
As a matter of fact, even when you don't use a projection (i.e. e.QueryableSource = context.Customers;) you will still have the error (it will trigger the EntityServerError event). The difference is that since you've already loaded the Customers, the grid will display the data located on the cache - projections are not stored in cache and must be retrieved from the datasource.
 
So a workaround would be to load all the Entities you will be working with into the cache, and set
context.DefaultQueryStrategy = QueryStrategy.CacheOnly.
This way you will be able to use the group functionality in DevExpress.
 
Regards,
   Silvio.


Posted By: Vonzkie
Date Posted: 01-Mar-2012 at 5:53pm
Hi,

Thanks for the info.
However, the reason why we use EntityInstantFeedbackSource is we don't want to load all the records at a time. (Example 1Million records)
Do you think I need to send this issue to Devexpress?

Thanks,
Von



Posted By: sbelini
Date Posted: 01-Mar-2012 at 6:01pm
Von,
 
You might want to get in touch with DevExpress and see if they have an alternative for the non-serializable type.
 
Also, regarding it only grouping 128 records, this appears to be a DevExpress limitation on the group functionality (or maybe a bug) considering that all the data is already in cache (n-tier) or is being retrieved from the datasource (2-tier).
 
Regards,
   Silvio.



Print Page | Close Window