Print Page | Close Window

Does the DevForce entity collections support standard grid operations

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=2147
Printed Date: 22-Oct-2025 at 5:53am


Topic: Does the DevForce entity collections support standard grid operations
Posted By: BringerOD
Subject: Does the DevForce entity collections support standard grid operations
Date Posted: 10-Sep-2010 at 12:54pm
This already seems like a dumb question, but I can't help myself.
 
Using WPF and say Telerik RadGridView can I create a grid and connect it to the Devforce entity collection and have basic features like below without having to code them manually?
  • Crude operation.  Can you click insert and have the grid just work without coding the behavior?
  • Sorting - Server side
  • Filtering - Server side
  • Grouping - Server side
Seems like I have to do most of this manually.
 
Bryan



Replies:
Posted By: ting
Date Posted: 13-Sep-2010 at 7:05pm
I believe the EntityQueryPagedCollectionView does a lot of this.  Unfortunately, it's only available for Silverlight and we don't have a WPF version yet.

You can find the Silverlight sample here:
http://drc.ideablade.com/xwiki/bin/view/Documentation/Code_UsingAPagedCollection - http://drc.ideablade.com/xwiki/bin/view/Documentation/Code_UsingAPagedCollection



Posted By: alindzon
Date Posted: 15-Oct-2010 at 6:26pm
Could someone please show how the pagedcollectionview can be used in an MVVM Light context (repository, viewmodel, view) to deliver paged content to a datagrid such as the RadGridView and RadDataPager, with server side paging and filtering?


Posted By: sbelini
Date Posted: 21-Oct-2010 at 10:59am
alindzon,
 
I'll work on a small sample and post.


Posted By: alindzon
Date Posted: 21-Oct-2010 at 11:05am
Please keep in mind I am doing my main data access in the view model ( i have no idea how to use a reporitory for this one)
 
My load data query for this screen is
 

var query = (EntityQuery<Product>)Context.Products.OrderBy(o => o.ProdID).Include("Inventories")

.Where(Data.FilterDescriptors).Sort(Data.SortDescriptors).Skip(startIndex).Take(itemCount);

query.ExecuteAsync().Completed += (s, e) =>{Data.Load(startIndex, e.Results);};

I cache the manufacturers with

var op = Manager.Manufacturers.OrderBy(c => c.ManName).ExecuteAsync();

when the program first loads by calling the manufacturersviewmodel which then hits the repository
 



Print Page | Close Window